linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco d'Itri" <md@Linux.IT>
To: linux-hotplug@vger.kernel.org
Subject: udev 021 patches 2/2
Date: Thu, 04 Mar 2004 01:15:21 +0000	[thread overview]
Message-ID: <20040304011521.GB22285@wonderland.linux.it> (raw)

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

udevstart_no_retval: currently udevstart will always return rc=22
because of the error handling code. I completely removed it because it
is not used, and returning a generic error to the init script is not
much useful anyway.

-- 
ciao, |
Marco | [4887 acJDyXc7CrEPQ]

[-- Attachment #2: udevstart_no_retval --]
[-- Type: text/plain, Size: 715 bytes --]

diff -ruNp udev-021.orig/udevstart.c udev-021/udevstart.c
--- udev-021.orig/udevstart.c	2004-03-03 01:01:33.000000000 +0100
+++ udev-021/udevstart.c	2004-03-03 15:41:34.000000000 +0100
@@ -78,12 +78,11 @@ static void udev_exec(const char *path, 
 	}
 }
 
-static int udev_scan(void)
+static void udev_scan(void)
 {
 	char *devpath;
 	DIR *dir;
 	struct dirent *dent;
-	int retval = -EINVAL;
 
 	devpath = "block";
 	dir = opendir(SYSBLOCK);
@@ -179,11 +178,6 @@ static int udev_scan(void)
 			}
 		}
 	}
-
-	if (retval > 0)
-		retval = 0;
-
-	return -retval;
 }
 
 
@@ -191,5 +185,7 @@ int main(int argc, char **argv, char **e
 {
 	init_logging("udevstart");
 
-	return udev_scan();
+	udev_scan();
+
+	return 0;
 }

             reply	other threads:[~2004-03-04  1:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-04  1:15 Marco d'Itri [this message]
2004-03-04 19:11 ` udev 021 patches 2/2 Greg KH
2004-03-04 19:37 ` Marco d'Itri
2004-03-04 19:47 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040304011521.GB22285@wonderland.linux.it \
    --to=md@linux.it \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).