summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authormaximilian attems2008-07-24 13:00:48 +0200
committerKarel Zak2008-07-28 11:06:07 +0200
commitfc68cd49731b580ecc2532adc07cad5322cfe1e7 (patch)
treeb83954a74752785e1bfbc6d883caaef07d4d5628 /disk-utils
parentldattach: don't compile for non-linux systems (diff)
downloadkernel-qcow2-util-linux-fc68cd49731b580ecc2532adc07cad5322cfe1e7.tar.gz
kernel-qcow2-util-linux-fc68cd49731b580ecc2532adc07cad5322cfe1e7.tar.xz
kernel-qcow2-util-linux-fc68cd49731b580ecc2532adc07cad5322cfe1e7.zip
disk-utils: s/MOUNTED/_PATH_MOUNTED/
no longer use deprecated alias. helps compiling util-linux-ng against klibc. add pathnames.h include, where _PATH_MOUNTED is defined. Signed-off-by: maximilian attems <max@stro.at>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/fsck.minix.c5
-rw-r--r--disk-utils/mkfs.minix.c3
-rw-r--r--disk-utils/mkswap.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index 8243b9cb5..5c577f61d 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -104,6 +104,7 @@
#include "minix.h"
#include "nls.h"
+#include "pathnames.h"
#ifndef __linux__
#define volatile
@@ -304,7 +305,7 @@ check_mount(void) {
int cont;
int fd;
- if ((f = setmntent (MOUNTED, "r")) == NULL)
+ if ((f = setmntent (_PATH_MOUNTED, "r")) == NULL)
return;
while ((mnt = getmntent (f)) != NULL)
if (strcmp (device_name, mnt->mnt_fsname) == 0)
@@ -318,7 +319,7 @@ check_mount(void) {
* probably not correct; so we won't issue a warning based on
* it.
*/
- fd = open(MOUNTED, O_RDWR);
+ fd = open(_PATH_MOUNTED, O_RDWR);
if (fd < 0 && errno == EROFS)
return;
else
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c
index a5e099261..f97df2743 100644
--- a/disk-utils/mkfs.minix.c
+++ b/disk-utils/mkfs.minix.c
@@ -75,6 +75,7 @@
#include "blkdev.h"
#include "minix.h"
#include "nls.h"
+#include "pathnames.h"
#ifndef __GNUC__
#error "needs gcc for the bitop-__asm__'s"
@@ -172,7 +173,7 @@ check_mount(void) {
FILE * f;
struct mntent * mnt;
- if ((f = setmntent (MOUNTED, "r")) == NULL)
+ if ((f = setmntent (_PATH_MOUNTED, "r")) == NULL)
return;
while ((mnt = getmntent (f)) != NULL)
if (strcmp (device_name, mnt->mnt_fsname) == 0)
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index 0bac74aba..f7dbdf399 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -51,6 +51,7 @@
#include "xstrncpy.h"
#include "nls.h"
#include "blkdev.h"
+#include "pathnames.h"
#ifdef HAVE_LIBUUID
#include <uuid/uuid.h>
@@ -425,7 +426,7 @@ check_mount(void) {
FILE * f;
struct mntent * mnt;
- if ((f = setmntent (MOUNTED, "r")) == NULL)
+ if ((f = setmntent (_PATH_MOUNTED, "r")) == NULL)
return 0;
while ((mnt = getmntent (f)) != NULL)
if (strcmp (device_name, mnt->mnt_fsname) == 0)