#error "No applicable input method."
#endif
-static int pagesize = 0;
+static int pagesize;
static int vserver_init(void) {
/* XXX Should we check for getpagesize () in configure?
errno = 0;
proc = opendir(PROCDIR);
if (proc == NULL) {
- char errbuf[1024];
- ERROR("vserver plugin: fopen (%s): %s", PROCDIR,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("vserver plugin: fopen (%s): %s", PROCDIR, STRERRNO);
return -1;
}
errno = 0;
dent = readdir(proc);
if (dent == NULL) {
- char errbuf[4096];
-
if (errno == 0) /* end of directory */
break;
ERROR("vserver plugin: failed to read directory %s: %s", PROCDIR,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ STRERRNO);
closedir(proc);
return -1;
}
status = stat(file, &statbuf);
if (status != 0) {
- char errbuf[4096];
- WARNING("vserver plugin: stat (%s) failed: %s", file,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("vserver plugin: stat (%s) failed: %s", file, STRERRNO);
continue;
}
continue;
if (NULL == (fh = fopen(file, "r"))) {
- char errbuf[1024];
- ERROR("Cannot open '%s': %s", file,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("Cannot open '%s': %s", file, STRERRNO);
}
while ((fh != NULL) && (NULL != fgets(buffer, BUFSIZE, fh))) {
continue;
if (NULL == (fh = fopen(file, "r"))) {
- char errbuf[1024];
- ERROR("Cannot open '%s': %s", file,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("Cannot open '%s': %s", file, STRERRNO);
}
while ((fh != NULL) && (NULL != fgets(buffer, BUFSIZE, fh))) {
continue;
if (NULL == (fh = fopen(file, "r"))) {
- char errbuf[1024];
- ERROR("Cannot open '%s': %s", file,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("Cannot open '%s': %s", file, STRERRNO);
}
while ((fh != NULL) && (NULL != fgets(buffer, BUFSIZE, fh))) {