[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/gfs2/quota main.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	adas sourceware org	2007-05-14 22:26:31

Modified files:
	gfs2/quota     : main.c 

Log message:
	Need to write the user/group id to the sysfs quota refresh file instead of '1'

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/main.c.diff?cvsroot=cluster&r1=1.4&r2=1.5

--- cluster/gfs2/quota/main.c	2007/05/10 15:47:45	1.4
+++ cluster/gfs2/quota/main.c	2007/05/14 22:26:31	1.5
@@ -555,6 +555,7 @@
 	int error;
 	char quota_file[BUF_SIZE];
 	char sys_q_refresh[BUF_SIZE];
+	char id_str[16];
 	
 	if (!*comline->filesystem)
 		die("need a filesystem to work on\n");
@@ -656,8 +657,10 @@
 			strerror(errno));
 		goto out;
 	}
+
+	sprintf(id_str, "%d", comline->id);
 	
-	if (write(fd1,(void*)"1", 1) != 1) {
+	if (write(fd1,(void*)id_str, strlen(id_str)) != strlen(id_str)) {
 		close(fd1);
 		fprintf(stderr, "failed to write to %s: %s\n", 
 			sys_q_refresh, strerror(errno));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]