X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_config.c;h=ae755f39fde82515b563d3892e750396227a7209;hb=139087e844b5e2a7f029b608db6a855cb2ca1ac3;hp=20b6c75d32604fa1fe4263e5fee07d5600541aa2;hpb=3e4414508b409a21b023b9ca4532f62003e0db97;p=elogind.git diff --git a/udev_config.c b/udev_config.c index 20b6c75d3..ae755f39f 100644 --- a/udev_config.c +++ b/udev_config.c @@ -50,7 +50,6 @@ char default_mode_str[MODE_SIZE]; char default_owner_str[OWNER_SIZE]; char default_group_str[GROUP_SIZE]; int udev_log; -int udev_sleep; int udev_dev_d; @@ -79,11 +78,6 @@ static void init_variables(void) strfieldcpy(udev_permissions_filename, UDEV_PERMISSION_FILE); udev_log = string_is_true(UDEV_LOG_DEFAULT); - udev_sleep = 1; - env = getenv("UDEV_NO_SLEEP"); - if (env && string_is_true(env)) - udev_sleep = 0; - udev_dev_d = 1; env = getenv("UDEV_NO_DEVD"); if (env && string_is_true(env)) @@ -161,15 +155,13 @@ static int parse_config_file(void) continue; } - /* empty line? */ - if (bufline[0] == '\0' || bufline[0] == '\n') - continue; - /* eat the whitespace */ - while (isspace(bufline[0])) { + while ((count > 0) && isspace(bufline[0])) { bufline++; count--; } + if (count == 0) + continue; /* see if this is a comment */ if (bufline[0] == COMMENT_CHARACTER)