All of lore.kernel.org
 help / color / mirror / Atom feed
* udev and existing symlinks
@ 2003-12-25 13:29 Marco d'Itri
  2003-12-30  1:24 ` Greg KH
  2003-12-30  1:52 ` Marco d'Itri
  0 siblings, 2 replies; 3+ messages in thread
From: Marco d'Itri @ 2003-12-25 13:29 UTC (permalink / raw)
  To: linux-hotplug

Without this patch udev will fail when a symlink already exists.

diff -ruN udev-011.orig/udev-add.c udev-011/udev-add.c
--- udev-011.orig/udev-add.c	2003-12-20 02:06:48.000000000 +0100
+++ udev-011/udev-add.c	2003-12-25 13:30:11.000000000 +0100
@@ -223,6 +223,8 @@
 
 			dbg("symlink(%s, %s)", linktarget, filename);
 			retval = symlink(linktarget, filename);
+			if (retval && errno = EEXIST)
+			    retval = 0;
 			if (retval)
 				dbg("symlink(%s, %s) failed with error '%s'",
 				    linktarget, filename, strerror(errno));

-- 
ciao, |
Marco | [3783 l'aPjd9wP9m5M]


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-30  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-25 13:29 udev and existing symlinks Marco d'Itri
2003-12-30  1:24 ` Greg KH
2003-12-30  1:52 ` Marco d'Itri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.