1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
Ripped from Fedora
More recent kernels actually want to umount using the mount point and
not the device name (this makes more sense, you can have the same
device mounted in many places).
This is a minor changes to do just that.
diff --exclude=debian -Nur eject-2.0.13deb/eject.c eject-2.0.13deb.cw/eject.c
--- eject-2.0.13deb/eject.c 2004-04-17 12:25:10.000000000 -0700
+++ eject-2.0.13deb.cw/eject.c 2004-04-17 12:26:55.000000000 -0700
@@ -718,8 +718,8 @@
status = regexec(&preg, s1, 0, 0, 0);
if (status == 0) {
if (v_option)
- printf(_("%s: unmounting `%s'\n"), programName, s1);
- Unmount(s1);
+ printf(_("%s: unmounting `%s'\n"), programName, s2);
+ Unmount(s2);
regfree(&preg);
}
}
@@ -952,8 +952,8 @@
/* unmount device if mounted */
if (mounted) {
if (v_option)
- printf(_("%s: unmounting `%s'\n"), programName, deviceName);
- Unmount(deviceName);
+ printf(_("%s: unmounting device `%s' from `%s'\n"), programName, deviceName, mountName);
+ Unmount(mountName);
}
/* if it is a multipartition device, unmount any other partitions on
|