chiark / gitweb /
udev: use unique names for temporary files created in /dev
authorKay Sievers <kay@vrfy.org>
Tue, 12 Feb 2013 15:03:45 +0000 (16:03 +0100)
committerKay Sievers <kay@vrfy.org>
Tue, 12 Feb 2013 15:08:14 +0000 (16:08 +0100)
commit38d70045d15d5bc463c097a6983a23502ff8a837
treeaa8a38e641e41b1e057e63108e560bb7f2638f1e
parenta0ec302b9309bc56f6bed6162e47ad6c27165747
udev: use unique names for temporary files created in /dev

On Tue, Feb 12, 2013 at 2:18 PM, Robert Milasan <rmilasan@suse.com> wrote:
> Under some circumstances udev mixed with multipath fails:
>
> udevd-work[1376]:
> symlink(../../sdk, /dev/disk/by-id/scsi-36005076305ffc0670000000000002842.udev-tmp)
> failed: File exists udevd-work[1432]:
> rename(/dev/disk/by-id/scsi-36005076305ffc0850000000000000a88.udev-tmp, /dev/disk/by-id/scsi-36005076305ffc0850000000000000a88)
> failed: No such file or directory
>
> This is non-fatal, but there is no point of created the symlink or
> renaming the symlink if it already exists.
>
> Reference: https://bugzilla.novell.com/show_bug.cgi?id=791503

It looke like this now:
  stat("/dev/disk/by-id", {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
  symlink("../../sda", "/dev/disk/by-id/ata-INTEL...N.tmp-b8:0") = 0
  rename("/dev/disk/by-id/ata-INTEL...N.tmp-b8:0", "/dev/disk/by-id/ata-INTEL...N") = 0
src/udev/udev-node.c