diff --git a/1096-new-udev-root-symlink-generator.patch b/1096-new-udev-root-symlink-generator.patch index c7961f37..49c1b2c9 100644 --- a/1096-new-udev-root-symlink-generator.patch +++ b/1096-new-udev-root-symlink-generator.patch @@ -32,7 +32,7 @@ Index: systemd-210/src/udev/rootsymlink_generator/rootsymlink_generator.c =================================================================== --- /dev/null +++ systemd-210/src/udev/rootsymlink_generator/rootsymlink_generator.c -@@ -0,0 +1,64 @@ +@@ -0,0 +1,65 @@ +/* + * Copyright (C) 2014-2015 Robert Milasan + * @@ -69,29 +69,30 @@ Index: systemd-210/src/udev/rootsymlink_generator/rootsymlink_generator.c + struct stat statbuf; + + if (stat(_ROOTDEV_, &statbuf) != 0) -+ return -errno; ++ return 1; + + if (major(statbuf.st_dev) > 0) { + int fd = -1; + char filename[BUFFER_SIZE]; + + if (mkdir(_PATH_, 0755) != 0 && errno != EEXIST) -+ return -errno; ++ return errno; + + snprintf(filename, BUFFER_SIZE, "%s/%s", _PATH_, _FILE_); + + if ((fd = open(filename, O_CREAT|O_WRONLY|O_TRUNC, 0644)) == -1) -+ return -errno; ++ return errno; + else { + char buf[BUFFER_SIZE]; + + snprintf(buf, BUFFER_SIZE, "ACTION==\"add|change\", SUBSYSTEM==\"block\", ENV{MAJOR}==\"%d\", ENV{MINOR}==\"%d\", SYMLINK+=\"root\"\n", + major(statbuf.st_dev), minor(statbuf.st_dev)); + -+ if (write(fd, buf, strlen(buf)) != strlen(buf)) -+ return -errno; ++ if (write(fd, buf, strlen(buf)) == -1) ++ return errno; + -+ close(fd); ++ if (close(fd) == -1) ++ return errno; + } + } + diff --git a/systemd-mini.changes b/systemd-mini.changes index c3fa60e5..f50611e0 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 25 09:44:42 UTC 2014 - rmilasan@suse.com + +- Fix error return in rootsymlink_generator.c + Update 1096-new-udev-root-symlink-generator.patch + ------------------------------------------------------------------- Fri Nov 21 13:35:40 UTC 2014 - werner@suse.de diff --git a/systemd.changes b/systemd.changes index c3fa60e5..f50611e0 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 25 09:44:42 UTC 2014 - rmilasan@suse.com + +- Fix error return in rootsymlink_generator.c + Update 1096-new-udev-root-symlink-generator.patch + ------------------------------------------------------------------- Fri Nov 21 13:35:40 UTC 2014 - werner@suse.de