if (text_size < 10240)
text_size = 10240; // have a minimum size for new files
screenbegin = dot = end = text = xzalloc(text_size);
-
+
if (fn != current_filename) {
free(current_filename);
current_filename = xstrdup(fn);
memset(mark, 0, sizeof(mark));
#endif
return rc;
-}
+}
static void edit_file(char * fn)
{
if (errno == EINTR)
goto ri0; // interrupted sys call
if (errno == EBADF || errno == EFAULT || errno == EINVAL
- || errno == EIO)
+ || errno == EIO)
editing = 0;
errno = 0;
}
* so we check fileperms too */
!(statbuf.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))))
{
- SET_READONLY_FILE(readonly_mode);
+ SET_READONLY_FILE(readonly_mode);
}
return cnt;
}
if (flags & PSSCAN_CONTEXT) {
if (getpidcon(sp->pid, &sp->context) < 0)
sp->context = NULL;
- }
-#endif
+ }
+#endif
filename_tail = filename + sprintf(filename, "/proc/%d", pid);
int bb_ioctl_or_warn(int fd, int request, void *argp, const char *ioctl_name)
{
int ret;
-
+
ret = ioctl(fd, request, argp);
if (ret < 0)
bb_perror_msg("%s", ioctl_name);
int bb_ioctl_or_warn(int fd, int request, void *argp)
{
int ret;
-
+
ret = ioctl(fd, request, argp);
if (ret < 0)
bb_perror_msg("ioctl %#x failed", request);
if (ENABLE_DEVFSD_FG_NP && no_polling)
exit(0);
-
+
if (ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG)
logmode = LOGMODE_BOTH;
else if (do_daemon == TRUE)
} else if (ENABLE_DEVFSD_FG_NP) {
setpgid(0, 0); /* Become process group leader */
}
-
+
while (TRUE) {
do_scan = do_servicing(fd, event_mask);
}
puts("unknown");
-
+
if (ENABLE_FEATURE_CLEAN_UP)
endutent();
return 1;