fprintf(f, "%d ", num);
}
+void qword_printuint(FILE *f, unsigned int num)
+{
+ fprintf(f, "%u ", num);
+}
+
int qword_eol(FILE *f)
{
int err;
return 0;
}
+int qword_get_uint(char **bpp, unsigned int *anint)
+{
+ char buf[50];
+ char *ep;
+ unsigned int rv;
+ int len = qword_get(bpp, buf, 50);
+ if (len < 0) return -1;
+ if (len ==0) return -1;
+ rv = strtoul(buf, &ep, 0);
+ if (*ep) return -1;
+ *anint = rv;
+ return 0;
+}
+
#define READLINE_BUFFER_INCREMENT 2048
int readline(int fd, char **buf, int *lenp)
int
check_new_cache(void)
{
- struct stat stb;
- return (stat("/proc/fs/nfs/filehandle", &stb) == 0) ||
- (stat("/proc/fs/nfsd/filehandle", &stb) == 0);
+ return (access("/proc/fs/nfs/filehandle", F_OK) == 0) ||
+ (access("/proc/fs/nfsd/filehandle", F_OK) == 0);
}