Skip to contentSkip to conversation

dmraid/lib/device scan.c

PATCH [email protected] 1 participant 1 message Jul 13, 2010 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: dmraid
Changes by: [email protected] 2010-07-13 20:11:22

Modified files:
lib/device : scan.c

Log message:
Use const char* for get_size()

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/device/scan.c.diff?cvsroot=dm&r1=1.4&r2=1.5

lib/device/scan.c +4 -3
@@ -260,7 +260,7 @@
 }
 
 static int
-get_size(struct lib_context *lc, char *path, char *name, int sysfs)
+get_size(struct lib_context *lc, const char *path, char *name, int sysfs)
 {
 	int fd, ret = 0;
 	char *dev_path;
@@ -305,7 +305,8 @@
 discover_devices(struct lib_context *lc, char **devnodes)
 {
 	int sysfs, ret = 0;
-	char *path, *p;
+	const char *path;
+	char *p;
 	DIR *d;
 	struct dirent *de;
 
@@ -314,7 +315,7 @@
 		path = p;
 	} else {
 		sysfs = 0;
-		path = (char *) _PATH_DEV;
+		path = _PATH_DEV;
 		log_print(lc, "carrying on with %s", path);
 	}