FreeBSD Bugzilla – Attachment 6148 Details for
Bug 14171
[PATCH] create symbolic links using mtree
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.57 KB, created by
fanf
on 1999-10-06 23:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
fanf
Created:
1999-10-06 23:00:01 UTC
Size:
1.57 KB
patch
obsolete
>--- /usr/src/usr.sbin/mtree/verify.c Wed Sep 1 17:24:19 1999 >+++ /usr/src/usr.sbin/mtree/verify.c Wed Oct 6 22:45:47 1999 >@@ -160,6 +160,7 @@ > { > register int create; > register char *tp; >+ const char *type; > > for (; p; p = p->next) { > if (p->type != F_DIR && (dflag || p->flags & F_VISIT)) >@@ -167,18 +168,32 @@ > (void)strcpy(tail, p->name); > if (!(p->flags & F_VISIT)) > (void)printf("missing: %s", path); >- if (p->type != F_DIR) { >+ if (p->type != F_DIR && p->type != F_LINK) { > putchar('\n'); > continue; > } > > create = 0; >+ if (p->type == F_LINK) >+ type = "symlink"; >+ else >+ type = "directory"; > if (!(p->flags & F_VISIT) && uflag) > if (!(p->flags & (F_UID | F_UNAME))) >- (void)printf(" (directory not created: user not specified)"); >+ (void)printf(" (%s not created: user not specified)", type); > else if (!(p->flags & (F_GID | F_GNAME))) >- (void)printf(" (directory not created: group not specified)"); >- else if (!(p->flags & F_MODE)) >+ (void)printf(" (%s not created: group not specified)", type); >+ else if (p->type == F_LINK) { >+ if (symlink(p->slink, path)) >+ (void)printf(" (symlink not created: %s)\n", >+ strerror(errno)); >+ else >+ (void)printf(" (created)\n"); >+ if (lchown(path, p->st_uid, p->st_gid)) >+ (void)printf("%s: user/group not modified: %s\n", >+ path, strerror(errno)); >+ continue; >+ } else if (!(p->flags & F_MODE)) > (void)printf(" (directory not created: mode not specified)"); > else if (mkdir(path, S_IRWXU)) > (void)printf(" (directory not created: %s)",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 14171
: 6148