FreeBSD Bugzilla – Attachment 70998 Details for
Bug 103501
[patch] mdmfs(8) enhancement to allow use in fstab and mount sliced/partitioned md devices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.32 KB, created by
ota
on 2006-09-23 03:10:21 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
ota
Created:
2006-09-23 03:10:21 UTC
Size:
1.32 KB
patch
obsolete
>--- mdmfs.c.orig Thu Feb 16 16:28:54 2006 >+++ mdmfs.c Fri Apr 14 21:27:08 2006 >@@ -48,6 +48,7 @@ > #include <stdio.h> > #include <stdlib.h> > #include <string.h> >+#include <ctype.h> > #include <unistd.h> > > typedef enum { false, true } bool; >@@ -67,6 +68,7 @@ > static bool norun; /* Actually run the helper programs? */ > static int unit; /* The unit we're working with. */ > static const char *mdname; /* Name of memory disk device (e.g., "md"). */ >+static const char *mdsuffix; /* Suffix of memory disk device (e.g., ".uzip"). */ > static size_t mdnamelen; /* Length of mdname. */ > static const char *path_mdconfig =_PATH_MDCONFIG; > >@@ -258,13 +260,16 @@ > unitstr += 5; > if (strncmp(unitstr, mdname, mdnamelen) == 0) > unitstr += mdnamelen; >- if (*unitstr == '\0') { >+ if (!isdigit(*unitstr)) { > autounit = true; > unit = -1; >+ mdsuffix = unitstr; > } else { > ul = strtoul(unitstr, &p, 10); >- if (ul == ULONG_MAX || *p != '\0') >+ if (ul == ULONG_MAX) > errx(1, "bad device unit: %s", unitstr); >+ if (*p != '\0') >+ mdsuffix = p; > unit = ul; > } > >@@ -446,8 +451,8 @@ > { > int rv; > >- rv = run(NULL, "%s%s /dev/%s%d %s", _PATH_MOUNT, args, >- mdname, unit, mtpoint); >+ rv = run(NULL, "%s%s /dev/%s%d%s %s", _PATH_MOUNT, args, >+ mdname, unit, mdsuffix, mtpoint); > if (rv) > errx(1, "mount exited with error code %d", rv); > }
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 103501
: 70998