Package: eject Version: 2.1.5+deb1+cvs20081104-13 Severity: normal Tags: patch
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Dear Maintainer, In ubuntu, the following bug report was filed: """ The eject command does not actually eject my cdrom, unless called as 'eject /dev/cdrom1' The problem seems to be that the eject command's default device is set to "/dev/cdrom" specifically. Yet, udev will increment the drive name if new cdroms are added or even if you change the cable that the cdrom is connected to. See https://bugzilla.redhat.com/show_bug.cgi?id=570490. udev now assigns permanent names to devices in case they're being hotplugged, which obviously makes sense for servers but a bit sub-optimal for desktops where you generally have no more than one cd... """ A patch has been proposed to address this issue. Please review and consider applying it. Regards, Dmitrijs. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBCAAGBQJSA57DAAoJEIh7YGGLPBauV8gQAKxY26DeAKPOyuNJ5mnkP6Ra tkmDAxTDia7iJGq9B13y3PSB/K0tBIXte7m9YrCQHRn+9PTbgUrJLsVhlE9Nt/wM 24RMi+0Vkf9yG6vl8nHfj7YTo9n/fTKhOx0s74b6Auhh/r/V8GdRSg7V+MoMTOFK m54VwtOzDRUgZ0UPAhJDR9xQ+MRNq9Y0Po0I5HAxR+SXtxBqgIV7MyrjoC4UsBDX Z4F0hfQJyVhDRJtbXZXVSTPVi4KSr2ls+APurjhoL/51j8wVsQmHya+ZZCZxDI4R IizKr9A+6rSA5UbtfOJTTYvO6+7seHbqKK7KP5Negzr6HTztWaRhIVLEtkApUA6M q015/VLukHPdboii5sFV5v+nff4CvVfI3IWX2zU6mNvNWYH7aaTab0IdKMdTQtE+ t8nafcGkvr+dMRZ/vkGM67dFceg9qA+ZqnDqIa8i89vpYFykW+IDDsRliWVnzROV Mkj+tiSdLvcP9VM1c858aVcyQ/v8l3f8gOgobyH8/AdJcijdRUR8gu5gZVjTtOfn 67Mpo47eDPPYpaWqbmr7c8Oq6QwxIJuStb5FlR6iJjWu8zP+Y8D3pFBlqc/7pfaK pLHIC62WZRTV1CmJw0HIgXVvDJCiTQRxoIwLM3o/by39a5W+5eSKR1QRynMwWRcs GZGTSKT+P1ZTW1brXwsz =/sMm -----END PGP SIGNATURE-----
=== modified file 'debian/changelog' --- debian/changelog 2012-12-23 23:30:02 +0000 +++ debian/changelog 2013-07-06 22:16:27 +0000 @@ -1,3 +1,10 @@ +eject (2.1.5+deb1+cvs20081104-13.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * eject now iterates through /dev/device_name[0-9] (LP: #795239) + + -- Ankit Sinha <ankit...@gmail.com> Sun, 07 Jul 2013 03:26:43 +0530 + eject (2.1.5+deb1+cvs20081104-13) unstable; urgency=low [ Christian Perrier ] === modified file 'eject.c' --- eject.c 2012-02-20 01:07:09 +0000 +++ eject.c 2013-07-06 22:16:27 +0000 @@ -431,6 +431,8 @@ char *buf; static int try = 0; int found = 0; + int i=0; + char temp; buf = (char *) malloc(strlen(name)+14); /* to allow for "/dev/cdroms/ + "0" + null */ if (buf==NULL) { @@ -455,6 +457,17 @@ if (FileExists(buf, try, &found)) return buf; + /* Cycles through device-name[0-9] */ + for(i=0;i<10;i++) + { + strcpy(buf, "/dev/"); + strcat(buf, name); + temp='0'+i; + strcat(buf, &temp); + if (FileExists(buf, try, &found)) + return buf; + } + strcpy(buf, "/media/"); strcat(buf, name); if (FileExists(buf, try, &found))