[PATCH] read/write volumes in dynroot /afs

Love lha at stacken.kth.se
Sun Apr 10 19:40:20 CEST 2005


Hi Peter,

> This small patch creates symlinks for readwrite access to AFS space in the
> form /afs/.cellname in the dynroot file space.  I have tested it against
> Linux only, version 0.36.2-11 (Debian) but I can't see any platform
> dependencies and the patch applies cleanly to the latest CVS version.

I prefer to not have the size restriction.

Love

2005-04-10  Love  <lha at kth.se>

	* arlad/dynroot.c (create_cell_entry_func): also create . entries
	pointing to rw site Idea from Peter Collingbourne on arla-drinkers
	


Index: dynroot.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/arlad/dynroot.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -u -w -r1.26 -r1.27
--- dynroot.c	8 Jan 2005 15:57:20 -0000	1.26
+++ dynroot.c	10 Apr 2005 17:37:44 -0000	1.27
@@ -109,10 +109,23 @@
 static int
 create_cell_entry_func (const cell_entry *cell, void *arg)
 {
+    char *rwname = NULL;
+    int ret;
+
     if (!cell_dynroot(cell))
 	return 0;
-    return create_entry_func(cell->name, cell->id, 
-			     DYNROOT_ALIAS_READONLY, arg);
+
+    ret = create_entry_func(cell->name, cell->id, DYNROOT_ALIAS_READONLY, arg);
+    if (ret)
+	return ret;
+
+    asprintf(&rwname, ".%s", cell->name);
+    if (rwname == NULL)
+	return 0;
+
+    ret = create_entry_func(rwname, cell->id, DYNROOT_ALIAS_READWRITE, arg);
+    free(rwname);
+    return ret;
 }
 
 /*

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00001.pgp
Type: application/octet-stream
Size: 477 bytes
Desc: "PGP signature"
Url : http://lists.stacken.kth.se/pipermail/arla-drinkers/attachments/00000000/94162831/pgp00001.obj


More information about the Arla-drinkers mailing list