summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-support/eject
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 20:05:37 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-23 04:26:31 +0300
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-support/eject
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadopenbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/eject')
-rw-r--r--meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.1-verbose.patch19
-rw-r--r--meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-error-return.patch12
-rw-r--r--meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-spaces.patch66
-rw-r--r--meta-openembedded/meta-oe/recipes-support/eject/eject/eject-timeout.patch17
-rw-r--r--meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb37
5 files changed, 151 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.1-verbose.patch b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.1-verbose.patch
new file mode 100644
index 000000000..740360606
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.1-verbose.patch
@@ -0,0 +1,19 @@
+Kept to help with debugging
+
+Upstream-Status: Pending
+
+Signed-off-by: Morgan Little <morgan.little@windriver.com>
+
+--- eject-2.1.1/eject.c.tn 2005-08-24 11:27:42.000000000 +0200
++++ eject-2.1.1/eject.c 2005-08-24 11:33:05.000000000 +0200
+@@ -638,7 +638,9 @@
+ unsigned char sense_buffer[32];
+
+ if ((ioctl(fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
+- printf("not an sg device, or old sg driver\n");
++ if (v_option) {
++ printf(_("not an sg device, or old sg driver\n"));
++ }
+ return 0;
+ }
+
diff --git a/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-error-return.patch b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-error-return.patch
new file mode 100644
index 000000000..5e13036c5
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-error-return.patch
@@ -0,0 +1,12 @@
+Upstream-Status: Inappropriate [the upstream is no longer active]
+
+--- eject/eject.c.orig 2013-09-11 18:08:36.000000000 +0800
++++ eject/eject.c 2013-09-11 18:09:05.000000000 +0800
+@@ -207,7 +207,6 @@
+ "If omitted, name defaults to `%s'.\n"
+ "By default tries -r, -s, -f, and -q in order until success.\n"),
+ DEFAULTDEVICE);
+- exit(1);
+ }
+
+
diff --git a/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-spaces.patch b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-spaces.patch
new file mode 100644
index 000000000..a16c4b1ce
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-2.1.5-spaces.patch
@@ -0,0 +1,66 @@
+Kept to help with spaces in the mount path
+
+Upstream-Status: Backport
+
+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.
+
+Signed-off-by: Morgan Little <morgan.little@windriver.com>
+--- eject/eject.c.ori 2007-06-24 00:08:44 -0700
++++ eject/eject.c 2007-06-24 00:12:44 -0700
+@@ -370,6 +370,30 @@
+
+
+ /*
++ * 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 @@
+ 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 @@
+ 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/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-timeout.patch b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-timeout.patch
new file mode 100644
index 000000000..de8146f32
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/eject/eject/eject-timeout.patch
@@ -0,0 +1,17 @@
+allow a longer timeout
+
+Upstream-Status: Backport
+
+Signed-off-by: Morgan Little <morgan.little@windriver.com>
+
+--- eject/eject.c.orig 2006-08-07 16:35:15.000000000 +0200
++++ eject/eject.c 2006-08-07 16:35:54.000000000 +0200
+@@ -723,7 +723,7 @@
+ io_hdr.dxfer_len = 0;
+ io_hdr.dxferp = inqBuff;
+ io_hdr.sbp = sense_buffer;
+- io_hdr.timeout = 2000;
++ io_hdr.timeout = 10000;
+
+ io_hdr.cmdp = allowRmBlk;
+ status = ioctl(fd, SG_IO, (void *)&io_hdr);
diff --git a/meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb b/meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb
new file mode 100644
index 000000000..49a3d74f6
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/eject/eject_2.1.5.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "Eject allows removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) to be ejected under software control."
+HOMEPAGE = "http://eject.sourceforge.net/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+inherit autotools gettext update-alternatives
+
+SRC_URI = "http://sources.openembedded.org/${BP}.tar.gz \
+ file://eject-2.1.5-error-return.patch \
+ file://eject-2.1.1-verbose.patch \
+ file://eject-2.1.5-spaces.patch \
+ file://eject-timeout.patch \
+"
+
+SRC_URI[md5sum] = "b96a6d4263122f1711db12701d79f738"
+SRC_URI[sha256sum] = "ef9f7906484cfde4ba223b2682a37058f9a3c7d3bb1adda7a34a67402e2ffe55"
+
+S = "${WORKDIR}/${BPN}"
+
+PR = "r1"
+
+do_compile_prepend() {
+ # PO subdir must be in build directory
+ if [ ! ${S} = ${B} ]; then
+ mkdir -p ${B}/po
+ cp -r ${S}/po/* ${B}/po/
+ fi
+}
+
+ALTERNATIVE_${PN} = "volname eject"
+ALTERNATIVE_LINK_NAME[volname] = "${bindir}/volname"
+ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
+ALTERNATIVE_PRIORITY[volname] = "100"
+ALTERNATIVE_PRIORITY[eject] = "100"
+
+ALTERNATIVE_${PN}-doc = "eject.1"
+ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1"