mirror of
git://slackware.nl/current.git
synced 2024-12-30 10:24:23 +01:00
81 lines
2.6 KiB
Diff
81 lines
2.6 KiB
Diff
|
--- rdist-6.1.5/src/filesys.c.stat64 2005-05-04 14:11:03.000000000 +0200
|
||
|
+++ rdist-6.1.5/src/filesys.c 2005-05-04 14:11:10.000000000 +0200
|
||
|
@@ -430,8 +430,8 @@
|
||
|
*/
|
||
|
int getfilesysinfo(file, freespace, freefiles)
|
||
|
char *file;
|
||
|
- long *freespace;
|
||
|
- long *freefiles;
|
||
|
+ fsblkcnt_t *freespace;
|
||
|
+ fsfilcnt_t *freefiles;
|
||
|
{
|
||
|
#if defined(STATFS_TYPE)
|
||
|
static statfs_t statfsbuf;
|
||
|
--- rdist-6.1.5/src/server.c.stat64 2005-05-04 14:11:23.000000000 +0200
|
||
|
+++ rdist-6.1.5/src/server.c 2005-05-04 14:20:34.000000000 +0200
|
||
|
@@ -62,8 +62,8 @@
|
||
|
int catname = 0; /* cat name to target name */
|
||
|
char *sptarget[32]; /* stack of saved ptarget's for directories */
|
||
|
char *fromhost = NULL; /* Client hostname */
|
||
|
-static long min_freespace = 0; /* Minimium free space on a filesystem */
|
||
|
-static long min_freefiles = 0; /* Minimium free # files on a filesystem */
|
||
|
+static fsblkcnt_t min_freespace = 0; /* Minimium free space on a filesystem */
|
||
|
+static fsfilcnt_t min_freefiles = 0; /* Minimium free # files on a filesystem */
|
||
|
int oumask; /* Old umask */
|
||
|
|
||
|
/*
|
||
|
@@ -1326,7 +1326,7 @@
|
||
|
fatalerr("Expected digit, got '%s'.", cp);
|
||
|
return;
|
||
|
}
|
||
|
- min_freespace = (unsigned long) atoi(cp);
|
||
|
+ min_freespace = (fsblkcnt_t) atoll(cp);
|
||
|
break;
|
||
|
|
||
|
case SC_FREEFILES: /* Minimium free files */
|
||
|
@@ -1334,7 +1334,7 @@
|
||
|
fatalerr("Expected digit, got '%s'.", cp);
|
||
|
return;
|
||
|
}
|
||
|
- min_freefiles = (unsigned long) atoi(cp);
|
||
|
+ min_freefiles = (fsfilcnt_t) atoll(cp);
|
||
|
break;
|
||
|
|
||
|
case SC_LOGGING: /* Logging options */
|
||
|
@@ -1364,7 +1364,8 @@
|
||
|
time_t mtime, atime;
|
||
|
char *owner, *group, *file;
|
||
|
char new[MAXPATHLEN];
|
||
|
- long freespace = -1, freefiles = -1;
|
||
|
+ fsfilcnt_t freefiles = -1;
|
||
|
+ fsblkcnt_t freespace = -1;
|
||
|
char *cp = cmd;
|
||
|
|
||
|
/*
|
||
|
@@ -1499,7 +1500,7 @@
|
||
|
*/
|
||
|
if (min_freespace || min_freefiles) {
|
||
|
/* Convert file size to kilobytes */
|
||
|
- long fsize = (long) (size / 1024);
|
||
|
+ fsblkcnt_t fsize = (fsblkcnt_t) (size / 1024);
|
||
|
|
||
|
if (getfilesysinfo(target, &freespace, &freefiles) != 0)
|
||
|
return;
|
||
|
@@ -1511,14 +1512,14 @@
|
||
|
if (min_freespace && (freespace >= 0) &&
|
||
|
(freespace - fsize < min_freespace)) {
|
||
|
error(
|
||
|
- "%s: Not enough free space on filesystem: min %d free %d",
|
||
|
+ "%s: Not enough free space on filesystem: min %lld free %lld",
|
||
|
target, min_freespace, freespace);
|
||
|
return;
|
||
|
}
|
||
|
if (min_freefiles && (freefiles >= 0) &&
|
||
|
(freefiles - 1 < min_freefiles)) {
|
||
|
error(
|
||
|
- "%s: Not enough free files on filesystem: min %d free %d",
|
||
|
+ "%s: Not enough free files on filesystem: min %lld free %lld",
|
||
|
target, min_freefiles, freefiles);
|
||
|
return;
|
||
|
}
|