diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-03-31 15:33:04 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-03-31 15:33:04 +0000 |
commit | 4ff052c70973c50f0b31d25b35713d665bc0d45f (patch) | |
tree | 1d6fe4869bf57e2d2a1c419655d373f70cfbaeb7 /sys-apps/eject/files | |
parent | Move sys-apps/eject to sys-block/eject. (diff) | |
download | gentoo-2-4ff052c70973c50f0b31d25b35713d665bc0d45f.tar.gz gentoo-2-4ff052c70973c50f0b31d25b35713d665bc0d45f.tar.bz2 gentoo-2-4ff052c70973c50f0b31d25b35713d665bc0d45f.zip |
Moved to sys-block/eject.
Diffstat (limited to 'sys-apps/eject/files')
-rw-r--r-- | sys-apps/eject/files/eject-2.0.13-xmalloc.patch | 28 | ||||
-rw-r--r-- | sys-apps/eject/files/eject-2.1.4-scsi-rdwr.patch | 21 | ||||
-rw-r--r-- | sys-apps/eject/files/eject-2.1.5-handle-spaces.patch | 57 | ||||
-rw-r--r-- | sys-apps/eject/files/eject-2.1.5-man-typo.patch | 18 | ||||
-rw-r--r-- | sys-apps/eject/files/eject-2.1.5-toggle.patch | 27 |
5 files changed, 0 insertions, 151 deletions
diff --git a/sys-apps/eject/files/eject-2.0.13-xmalloc.patch b/sys-apps/eject/files/eject-2.0.13-xmalloc.patch deleted file mode 100644 index f609da19d05f..000000000000 --- a/sys-apps/eject/files/eject-2.0.13-xmalloc.patch +++ /dev/null @@ -1,28 +0,0 @@ -Make sure the malloc's work. - -http://bugs.gentoo.org/91977 - ---- eject.c -+++ eject.c -@@ -304,2 +304,11 @@ - -+void *xmalloc(size_t size) -+{ -+ void *ret = malloc(size); -+ if (!ret) { -+ fprintf(stderr, _("%s: could not allocate memory\n"), programName); -+ exit(1); -+ } -+ return ret; -+} - -@@ -324,3 +333,3 @@ - -- buf = (char *) malloc(strlen(name)+14); /* to allow for "/dev/cdroms/ + "0" + null */ -+ buf = (char *) xmalloc(strlen(name)+14); /* to allow for "/dev/cdroms/ + "0" + null */ - -@@ -794,3 +803,3 @@ - if (status == 0) { -- result = (char *) malloc(strlen(name) + 25); -+ result = (char *) xmalloc(strlen(name) + 25); - strcpy(result, name); diff --git a/sys-apps/eject/files/eject-2.1.4-scsi-rdwr.patch b/sys-apps/eject/files/eject-2.1.4-scsi-rdwr.patch deleted file mode 100644 index cd5e497b9d9a..000000000000 --- a/sys-apps/eject/files/eject-2.1.4-scsi-rdwr.patch +++ /dev/null @@ -1,21 +0,0 @@ -http://bugs.gentoo.org/116731 - ---- eject-2.0.13/eject.c -+++ eject-2.0.13/eject.c -@@ -657,7 +657,15 @@ - /* Open a device file. */ - static int OpenDevice(const char *fullName) - { -- int fd = open(fullName, O_RDONLY|O_NONBLOCK); -+ int flags = O_NONBLOCK; -+ int fd; -+ -+ if (s_option) -+ flags |= O_RDWR; -+ else -+ flags |= O_RDONLY; -+ -+ fd = open(fullName, flags); - if (fd == -1) { - fprintf(stderr, _("%s: unable to open `%s'\n"), programName, fullName); - exit(1); diff --git a/sys-apps/eject/files/eject-2.1.5-handle-spaces.patch b/sys-apps/eject/files/eject-2.1.5-handle-spaces.patch deleted file mode 100644 index 692368fa50b8..000000000000 --- a/sys-apps/eject/files/eject-2.1.5-handle-spaces.patch +++ /dev/null @@ -1,57 +0,0 @@ -http://bugs.gentoo.org/151257 - ---- eject.c -+++ eject.c -@@ -370,6 +370,30 @@ static int FileExists(const char *name, - - - /* -+ * Linux mangles spaces in mount points by changing them to an octal string -+ * of '\040'. So lets scan the mount point and fix it up by replacing all -+ * occurrences off '\0##' with the ASCII value of 0##. Requires a writable -+ * string as input as we mangle in place. Some of this was taken from the -+ * util-linux package. -+ */ -+#define octalify(a) ((a) & 7) -+#define tooctal(s) (64*octalify(s[1]) + 8*octalify(s[2]) + octalify(s[3])) -+#define isoctal(a) (((a) & ~7) == '0') -+static char *DeMangleMount(char *s) -+{ -+ char *tmp = s; -+ while ((tmp = strchr(tmp, '\\')) != NULL) { -+ if (isoctal(tmp[1]) && isoctal(tmp[2]) && isoctal(tmp[3])) { -+ tmp[0] = tooctal(tmp); -+ memmove(tmp+1, tmp+4, strlen(tmp)-3); -+ } -+ ++tmp; -+ } -+ return s; -+} -+ -+ -+/* - * Given name, such as foo, see if any of the following exist: - * - * foo (if foo starts with '.' or '/') -@@ -884,8 +908,8 @@ static int MountedDevice(const char *nam - if (((strcmp(s1, name) == 0) || (strcmp(s2, name) == 0)) || - ((maj != -1) && (maj == mtabmaj) && (min == mtabmin))) { - FCLOSE(fp); -- *deviceName = strdup(s1); -- *mountName = strdup(s2); -+ *deviceName = DeMangleMount(strdup(s1)); -+ *mountName = DeMangleMount(strdup(s2)); - return 1; - } - } -@@ -928,8 +952,8 @@ static int MountableDevice(const char *n - rc = sscanf(line, "%1023s %1023s", s1, s2); - if (rc >= 2 && s1[0] != '#' && strcmp(s2, name) == 0) { - FCLOSE(fp); -- *deviceName = strdup(s1); -- *mountName = strdup(s2); -+ *deviceName = DeMangleMount(strdup(s1)); -+ *mountName = DeMangleMount(strdup(s2)); - return 1; - } - } diff --git a/sys-apps/eject/files/eject-2.1.5-man-typo.patch b/sys-apps/eject/files/eject-2.1.5-man-typo.patch deleted file mode 100644 index 2fecb745ce0f..000000000000 --- a/sys-apps/eject/files/eject-2.1.5-man-typo.patch +++ /dev/null @@ -1,18 +0,0 @@ -http://bugs.gentoo.org/165248 - -Index: eject.1 -=================================================================== -RCS file: /cvsroot/eject/eject/eject/eject.1,v -retrieving revision 1.5 -diff -u -p -r1.5 eject.1 ---- eject.1 11 Dec 2005 00:21:06 -0000 1.5 -+++ eject.1 4 Feb 2007 23:11:15 -0000 -@@ -145,7 +145,7 @@ also passes the \-n option to umount(1). - .TP 0.5i - .B \-m - This option allows eject to work with device drivers which automatically --mount removable media and therefore must be always mount()ed. -+mount removable media and therefore must be always mount(1)ed. - The option tells eject to not try to unmount the given device, - even if it is mounted according to /etc/mtab or /proc/mounts. - diff --git a/sys-apps/eject/files/eject-2.1.5-toggle.patch b/sys-apps/eject/files/eject-2.1.5-toggle.patch deleted file mode 100644 index 30a96028fbd6..000000000000 --- a/sys-apps/eject/files/eject-2.1.5-toggle.patch +++ /dev/null @@ -1,27 +0,0 @@ -idea take from opensuse -http://bugs.gentoo.org/261880 - ---- a/eject.c -+++ b/eject.c -@@ -576,6 +576,21 @@ static void ToggleTray(int fd) - - #ifdef CDROMCLOSETRAY - -+ /* Ask the CDROM for info, otherwise fall back to manual */ -+ switch (ioctl(fd, CDROM_DRIVE_STATUS)) { -+ case CDS_TRAY_OPEN: -+ CloseTray(fd); -+ return; -+ -+ case CDS_NO_DISC: -+ case CDS_DISC_OK: -+ if (ioctl(fd, CDROMEJECT, 0) < 0) { -+ perror("ioctl"); -+ exit(1); -+ } -+ return; -+ } -+ - /* Try to open the CDROM tray and measure the time therefor - * needed. In my experience the function needs less than 0.05 - * seconds if the tray was already open, and at least 1.5 seconds |