Skip to content

Commit

Permalink
disk-utils: s/MOUNTED/_PATH_MOUNTED/
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
brainflux authored and karelzak committed Jul 28, 2008
1 parent abd0b56 commit fc68cd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions disk-utils/fsck.minix.c
Expand Up @@ -104,6 +104,7 @@

#include "minix.h"
#include "nls.h"
#include "pathnames.h"

#ifndef __linux__
#define volatile
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion disk-utils/mkfs.minix.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion disk-utils/mkswap.c
Expand Up @@ -51,6 +51,7 @@
#include "xstrncpy.h"
#include "nls.h"
#include "blkdev.h"
#include "pathnames.h"

#ifdef HAVE_LIBUUID
#include <uuid/uuid.h>
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fc68cd4

Please sign in to comment.