[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-101-g2616afb

Mike Christie michaelc at cs.wisc.edu
Mon May 2 18:56:39 UTC 2011


The following commit has been merged in the upstream-mnc branch:
commit b38dc20a32b7f3e0e46be6695a4a10475abfb21f
Author: Mark Rustad <mark.d.rustad at intel.com>
Date:   Wed Feb 2 17:54:34 2011 -0800

    Add some consts to char * parameters that are not changed
    
    Add const to some char * parameters that are not changed by the called
    routine.
    
    Signed-off-by: Mark Rustad <mark.d.rustad at intel.com>

diff --git a/usr/sysfs.c b/usr/sysfs.c
index 8c176f0..cb9cf08 100644
--- a/usr/sysfs.c
+++ b/usr/sysfs.c
@@ -547,7 +547,7 @@ found:
 }
 
 
-char *sysfs_get_value(char *id, char *subsys, char *param)
+char *sysfs_get_value(const char *id, char *subsys, char *param)
 {
 	char devpath[PATH_SIZE];
 	char *sysfs_value;
@@ -590,7 +590,7 @@ int sysfs_get_uint(char *id, char *subsys, char *param,
 	return 0;
 }
 
-int sysfs_get_int(char *id, char *subsys, char *param, int *value)
+int sysfs_get_int(const char *id, char *subsys, char *param, int *value)
 {
 	char *sysfs_value;
 
diff --git a/usr/sysfs.h b/usr/sysfs.h
index 4c70dbd..f5e13b3 100644
--- a/usr/sysfs.h
+++ b/usr/sysfs.h
@@ -51,10 +51,10 @@ extern char *sysfs_attr_get_value(const char *devpath, const char *attr_name);
 extern int sysfs_resolve_link(char *path, size_t size);
 extern int sysfs_lookup_devpath_by_subsys_id(char *devpath, size_t len, const char *subsystem, const char *id);
 
-extern char *sysfs_get_value(char *id, char *subsys, char *param);
+extern char *sysfs_get_value(const char *id, char *subsys, char *param);
 extern int sysfs_get_uint(char *id, char *subsys, char *param,
 			  unsigned int *value);
-extern int sysfs_get_int(char *id, char *subsys, char *param, int *value);
+extern int sysfs_get_int(const char *id, char *subsys, char *param, int *value);
 extern int sysfs_get_str(char *id, char *subsys, char *param, char *value,
 			 int value_size);
 extern int sysfs_get_uint64(char *id, char *subsys, char *param,

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list