summaryrefslogtreecommitdiff
path: root/quotasys.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2002-05-20 12:16:31 +0000
committerjkar8572 <jkar8572>2002-05-20 12:16:31 +0000
commite20d4e982358a6c66c77a4ddd8bd86139ec2f3cb (patch)
tree623a5eea0e97247d091414e6656952e9464e08f6 /quotasys.c
parent1883e1ee6514b304d0bb6fa5705644230b145a4b (diff)
Fixed printing of sign 'over soft quota' in quota(1)
Fixed detection of XFS.
Diffstat (limited to 'quotasys.c')
-rw-r--r--quotasys.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quotasys.c b/quotasys.c
index 4123542..b610297 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -520,6 +520,8 @@ void init_kernel_interface(void)
struct stat st;
kernel_formats = 0;
+ if (!stat("/proc/fs/xfs/stat", &st))
+ kernel_formats |= (1 << QF_XFS);
if ((f = fopen(QSTAT_FILE, "r"))) {
/* Parse statistics file */
fgets(buf, sizeof(buf), f);
@@ -545,8 +547,6 @@ void init_kernel_interface(void)
struct v2_dqstats v2_stats;
struct sigaction sig, oldsig;
- if (!stat("/proc/fs/xfs/stat", &st))
- kernel_formats |= (1 << QF_XFS);
/* This signal handling is needed because old kernels send us SIGSEGV as they try to resolve the device */
sig.sa_handler = SIG_IGN;
sig.sa_sigaction = NULL;
@@ -821,7 +821,7 @@ static int cache_mnt_table(void)
}
/* Find mountpoint of filesystem hosting dir in 'st'; Store it in 'st' */
-static char *find_dir_mntpoint(struct stat *st)
+static const char *find_dir_mntpoint(struct stat *st)
{
int i;
@@ -851,7 +851,7 @@ static int process_dirs(int dcnt, char **dirs, int flags)
}
check_dirs[check_dirs_cnt].sd_dir = S_ISDIR(st.st_mode);
if (S_ISDIR(st.st_mode)) {
- char *realmnt = dirs[i];
+ const char *realmnt = dirs[i];
/* Return st of mountpoint of dir in st.. */
if (flags & MS_NO_MNTPOINT && !(realmnt = find_dir_mntpoint(&st))) {