diff options
author | Sami Kerola | 2011-06-29 23:17:09 +0200 |
---|---|---|
committer | Sami Kerola | 2011-06-30 00:35:54 +0200 |
commit | 14c76d8b51e4bf906605025cb91e0fa072227050 (patch) | |
tree | 49ee48c8aa6007526f2e20851d59964d7c82290c /disk-utils/blockdev.c | |
parent | blockdev: use libc error facilities (diff) | |
download | kernel-qcow2-util-linux-14c76d8b51e4bf906605025cb91e0fa072227050.tar.gz kernel-qcow2-util-linux-14c76d8b51e4bf906605025cb91e0fa072227050.tar.xz kernel-qcow2-util-linux-14c76d8b51e4bf906605025cb91e0fa072227050.zip |
blockdev: use pathnames.h to find partitions
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/blockdev.c')
-rw-r--r-- | disk-utils/blockdev.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index 547dc9113..bbdc08e0d 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 ]", |