]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: mp target trailing dot not part vol name
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 4 Mar 2011 16:04:40 +0000 (11:04 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 15 Mar 2011 02:28:42 +0000 (19:28 -0700)
Instead of passing "root.cell." into cm_FreelanceAddMount
pass in "root.cell" and add the trailing dot within the function.

Reviewed-on: http://gerrit.openafs.org/4124
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 0d1335ad7104a6fa67525b84d70a33e7bb1b6c6a)

Change-Id: I27b077c7fd9e8ea5cb67da96b5172d69623e1122
Reviewed-on: http://gerrit.openafs.org/4221
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/WINNT/afsd/cm_freelance.c

index 3deac244b1bb464559deb57b759d5c67d6f45e86..05afc9dc09d28428fea73fcbe2104f58d132e988 100644 (file)
@@ -587,9 +587,9 @@ long cm_InitLocalMountPoints() {
             code = cm_GetRootCellName(&rootCellName[1]);
             if (code == 0) {
                 lock_ReleaseMutex(&cm_Freelance_Lock);
-                cm_FreelanceAddMount(&rootCellName[1], &rootCellName[1], "root.cell.", 0, NULL);
-                cm_FreelanceAddMount(rootCellName, &rootCellName[1], "root.cell.", 1, NULL);
-                cm_FreelanceAddMount(".root", &rootCellName[1], "root.afs.", 1, NULL);
+                cm_FreelanceAddMount(&rootCellName[1], &rootCellName[1], "root.cell", 0, NULL);
+                cm_FreelanceAddMount(rootCellName, &rootCellName[1], "root.cell", 1, NULL);
+                cm_FreelanceAddMount(".root", &rootCellName[1], "root.afs", 1, NULL);
                 lock_ObtainMutex(&cm_Freelance_Lock);
                 dwMountPoints = 3;
             }
@@ -788,9 +788,9 @@ long cm_InitLocalMountPoints() {
        code = cm_GetRootCellName(&rootCellName[1]);
         if (code == 0) {
             lock_ReleaseMutex(&cm_Freelance_Lock);
-            cm_FreelanceAddMount(&rootCellName[1], &rootCellName[1], "root.cell.", 0, NULL);
-            cm_FreelanceAddMount(rootCellName, &rootCellName[1], "root.cell.", 1, NULL);
-            cm_FreelanceAddMount(".root", &rootCellName[1], "root.afs.", 1, NULL);
+            cm_FreelanceAddMount(&rootCellName[1], &rootCellName[1], "root.cell", 0, NULL);
+            cm_FreelanceAddMount(rootCellName, &rootCellName[1], "root.cell", 1, NULL);
+            cm_FreelanceAddMount(".root", &rootCellName[1], "root.afs", 1, NULL);
             lock_ObtainMutex(&cm_Freelance_Lock);
         }
         return 0;
@@ -1114,9 +1114,9 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw,
                          );
 
         if (rw)
-            sprintf(line, "%s%%%s:%s", filename, fullname, volume);
+            sprintf(line, "%s%%%s:%s.", filename, fullname, volume);
         else
-            sprintf(line, "%s#%s:%s", filename, fullname, volume);
+            sprintf(line, "%s#%s:%s.", filename, fullname, volume);
 
         /* If we are adding a new value, there must be an unused name
          * within the range 0 to dwMountPoints 
@@ -1160,9 +1160,9 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw,
         fprintf(fp, "%d", n);
         fseek(fp, 0, SEEK_END);
         if (rw)
-            fprintf(fp, "%s%%%s:%s\n", filename, fullname, volume);
+            fprintf(fp, "%s%%%s:%s.\n", filename, fullname, volume);
         else
-            fprintf(fp, "%s#%s:%s\n", filename, fullname, volume);
+            fprintf(fp, "%s#%s:%s.\n", filename, fullname, volume);
         fclose(fp);
     }