Sometimes people use device names provided by udev like
/dev/disk/by-id/blahblahblah, but libkarma wants them to always use
/dev/sd* when autoprobing. It doesn't matter what it is since we still
look in the mount for the smalldb. Franky, please apply attached.
--
Bob Copeland %% www.bobcopeland.com
# HG changeset patch
# User [EMAIL PROTECTED]
# Date 1159754102 14400
# Node ID 550d970756a8d740b8c55ff181e7abc0e804674a
# Parent 1f785761de548bd44f7e66b7ebdcf814c2754d7f
Don't check the device name of the mount in /proc/mounts; people may
want to use a renamed or permanent device node from udev.
diff -r 1f785761de54 -r 550d970756a8 src/mountSearch.c
--- a/src/mountSearch.c Sun Sep 10 15:54:48 2006 +0200
+++ b/src/mountSearch.c Sun Oct 01 21:55:02 2006 -0400
@@ -50,29 +50,28 @@ int lk_mountSearch_discover(char **devic
*fin = '\0';
/* fprintf(stderr, "%s\n", ini); */
if(strstr(ini, "omfs")) {
- if((dev = strstr(ini, "/dev/sd"))) {
- aux = strstr(dev, " ");
+ dev = ini;
+ aux = strstr(dev, " ");
+ *aux = '\0';
+ ini = aux + 1;
+ if((mountp = strstr(ini, "/"))) {
+ aux = strstr(mountp, " ");
*aux = '\0';
- ini = aux + 1;
- if((mountp = strstr(ini, "/"))) {
- aux = strstr(mountp, " ");
- *aux = '\0';
- if(((*device = strdup(dev)) == NULL) ||
- ((*mountPoint = strdup(mountp)) == NULL)) {
- lk_errors_set(E_NOMOUNT);
- return -1;
- }
-/* fprintf(stderr, "%s %s\n", *device, *mountPoint); */
-
- if(lk_is_karma_mountpoint(*mountPoint) != 0) {
- free(*mountPoint);
- free(*device);
- *mountPoint=NULL;
- lk_errors_set(E_NOMOUNT);
- return -1;
- }
- found++;
+ if(((*device = strdup(dev)) == NULL) ||
+ ((*mountPoint = strdup(mountp)) == NULL)) {
+ lk_errors_set(E_NOMOUNT);
+ return -1;
}
+/* fprintf(stderr, "%s %s\n", *device, *mountPoint); */
+
+ if(lk_is_karma_mountpoint(*mountPoint) != 0) {
+ free(*mountPoint);
+ free(*device);
+ *mountPoint=NULL;
+ lk_errors_set(E_NOMOUNT);
+ return -1;
+ }
+ found++;
}
}
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel