From: Sami Kerola Date: Wed, 29 Jun 2011 21:17:09 +0000 (+0200) Subject: blockdev: use pathnames.h to find partitions X-Git-Tag: v2.20-rc1~113^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14c76d8b51e4bf906605025cb91e0fa072227050;p=thirdparty%2Futil-linux.git blockdev: use pathnames.h to find partitions Signed-off-by: Sami Kerola --- diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index 547dc9113f..bbdc08e0d2 100644 --- a/disk-utils/blockdev.c +++ b/disk-utils/blockdev.c @@ -14,6 +14,7 @@ #include "c.h" #include "nls.h" #include "blkdev.h" +#include "pathnames.h" struct bdc { long ioc; /* ioctl code */ @@ -406,8 +407,6 @@ do_commands(int fd, char **argv, int d) { } } -#define PROC_PARTITIONS "/proc/partitions" - void report_all_devices(void) { FILE *procpt; @@ -416,9 +415,9 @@ report_all_devices(void) { char device[210]; int ma, mi, sz; - procpt = fopen(PROC_PARTITIONS, "r"); + procpt = fopen(_PATH_PROC_PARTITIONS, "r"); if (!procpt) - err(EXIT_FAILURE, _("cannot open %s"), PROC_PARTITIONS); + err(EXIT_FAILURE, _("cannot open %s"), _PATH_PROC_PARTITIONS); while (fgets(line, sizeof(line), procpt)) { if (sscanf (line, " %d %d %d %200[^\n ]",