Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110468
b: refs/heads/master
c: ac65ece
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Oct 9, 2008
1 parent b903ecd commit 3bca979
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a3ceb861663040f9ef0176df4aaa494bba5e352
refs/heads/master: ac65ece4eee10b03ac29ee925cadc179dc810bab
10 changes: 5 additions & 5 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,15 @@ static int printk_partition(struct device *dev, void *data)
int n;

if (dev->type != &disk_type)
goto exit;
return 0;

sgp = dev_to_disk(dev);
/*
* Don't show empty devices or things that have been surpressed
*/
if (get_capacity(sgp) == 0 ||
(sgp->flags & GENHD_FL_SUPPRESS_PARTITION_INFO))
goto exit;
return 0;

/*
* Note, unlike /proc/partitions, I am showing the numbers in
Expand All @@ -264,15 +264,15 @@ static int printk_partition(struct device *dev, void *data)
/* now show the partitions */
for (n = 0; n < sgp->minors - 1; ++n) {
if (sgp->part[n] == NULL)
goto exit;
continue;
if (sgp->part[n]->nr_sects == 0)
goto exit;
continue;
printk(" %02x%02x %10llu %s\n",
sgp->major, n + 1 + sgp->first_minor,
(unsigned long long)sgp->part[n]->nr_sects >> 1,
disk_name(sgp, n + 1, buf));
}
exit:

return 0;
}

Expand Down

0 comments on commit 3bca979

Please sign in to comment.