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>
This commit is contained in:
parent
abd0b5686d
commit
fc68cd4973
|
@ -104,6 +104,7 @@
|
||||||
|
|
||||||
#include "minix.h"
|
#include "minix.h"
|
||||||
#include "nls.h"
|
#include "nls.h"
|
||||||
|
#include "pathnames.h"
|
||||||
|
|
||||||
#ifndef __linux__
|
#ifndef __linux__
|
||||||
#define volatile
|
#define volatile
|
||||||
|
@ -304,7 +305,7 @@ check_mount(void) {
|
||||||
int cont;
|
int cont;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if ((f = setmntent (MOUNTED, "r")) == NULL)
|
if ((f = setmntent (_PATH_MOUNTED, "r")) == NULL)
|
||||||
return;
|
return;
|
||||||
while ((mnt = getmntent (f)) != NULL)
|
while ((mnt = getmntent (f)) != NULL)
|
||||||
if (strcmp (device_name, mnt->mnt_fsname) == 0)
|
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
|
* probably not correct; so we won't issue a warning based on
|
||||||
* it.
|
* it.
|
||||||
*/
|
*/
|
||||||
fd = open(MOUNTED, O_RDWR);
|
fd = open(_PATH_MOUNTED, O_RDWR);
|
||||||
if (fd < 0 && errno == EROFS)
|
if (fd < 0 && errno == EROFS)
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
#include "blkdev.h"
|
#include "blkdev.h"
|
||||||
#include "minix.h"
|
#include "minix.h"
|
||||||
#include "nls.h"
|
#include "nls.h"
|
||||||
|
#include "pathnames.h"
|
||||||
|
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
#error "needs gcc for the bitop-__asm__'s"
|
#error "needs gcc for the bitop-__asm__'s"
|
||||||
|
@ -172,7 +173,7 @@ check_mount(void) {
|
||||||
FILE * f;
|
FILE * f;
|
||||||
struct mntent * mnt;
|
struct mntent * mnt;
|
||||||
|
|
||||||
if ((f = setmntent (MOUNTED, "r")) == NULL)
|
if ((f = setmntent (_PATH_MOUNTED, "r")) == NULL)
|
||||||
return;
|
return;
|
||||||
while ((mnt = getmntent (f)) != NULL)
|
while ((mnt = getmntent (f)) != NULL)
|
||||||
if (strcmp (device_name, mnt->mnt_fsname) == 0)
|
if (strcmp (device_name, mnt->mnt_fsname) == 0)
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "xstrncpy.h"
|
#include "xstrncpy.h"
|
||||||
#include "nls.h"
|
#include "nls.h"
|
||||||
#include "blkdev.h"
|
#include "blkdev.h"
|
||||||
|
#include "pathnames.h"
|
||||||
|
|
||||||
#ifdef HAVE_LIBUUID
|
#ifdef HAVE_LIBUUID
|
||||||
#include <uuid/uuid.h>
|
#include <uuid/uuid.h>
|
||||||
|
@ -425,7 +426,7 @@ check_mount(void) {
|
||||||
FILE * f;
|
FILE * f;
|
||||||
struct mntent * mnt;
|
struct mntent * mnt;
|
||||||
|
|
||||||
if ((f = setmntent (MOUNTED, "r")) == NULL)
|
if ((f = setmntent (_PATH_MOUNTED, "r")) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
while ((mnt = getmntent (f)) != NULL)
|
while ((mnt = getmntent (f)) != NULL)
|
||||||
if (strcmp (device_name, mnt->mnt_fsname) == 0)
|
if (strcmp (device_name, mnt->mnt_fsname) == 0)
|
||||||
|
|
Loading…
Reference in New Issue