]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blockdev: use pathnames.h to find partitions
authorSami Kerola <kerolasa@iki.fi>
Wed, 29 Jun 2011 21:17:09 +0000 (23:17 +0200)
committerSami Kerola <kerolasa@iki.fi>
Wed, 29 Jun 2011 22:35:54 +0000 (00:35 +0200)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/blockdev.c

index 547dc9113f6e14eed85772f5b9cd5c2802dd4b4e..bbdc08e0d2647dbe6a2a5481ef260b0287f1e300 100644 (file)
@@ -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 ]",