FreeBSD Bugzilla – Attachment 165905 Details for
Bug 206461
Geom redboot module fis offset problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
geom_redboot patch
geom_redboot.c.diff (text/plain), 1.13 KB, created by
HIROKI MORI
on 2016-01-21 10:15:07 UTC
(
hide
)
Description:
geom_redboot patch
Filename:
MIME Type:
Creator:
HIROKI MORI
Created:
2016-01-21 10:15:07 UTC
Size:
1.13 KB
patch
obsolete
>diff --git a/sys/geom/geom_redboot.c b/sys/geom/geom_redboot.c >index 0e1f4d3..938473c 100644 >--- a/sys/geom/geom_redboot.c >+++ b/sys/geom/geom_redboot.c >@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); > #include <sys/bio.h> > #include <sys/lock.h> > #include <sys/mutex.h> >+#include <sys/bus.h> > > #include <sys/sbuf.h> > #include <geom/geom.h> >@@ -246,6 +247,16 @@ g_redboot_taste(struct g_class *mp, struct g_provider *pp, int insist) > u_int blksize; /* NB: flash block size stored as stripesize */ > u_char *buf; > off_t offset; >+ const char *value; >+ char *op; >+ >+ offset = 0; >+ if (resource_string_value("redboot", 0, "fisoffset", &value) == 0) { >+ offset = strtouq(value, &op, 0); >+ if (*op != '\0') { >+ offset = 0; >+ } >+ } > > g_trace(G_T_TOPOLOGY, "redboot_taste(%s,%s)", mp->name, pp->name); > g_topology_assert(); >@@ -278,7 +289,8 @@ g_redboot_taste(struct g_class *mp, struct g_provider *pp, int insist) > return (NULL); > g_topology_unlock(); > head = NULL; >- offset = cp->provider->mediasize - blksize; >+ if(offset == 0) >+ offset = cp->provider->mediasize - blksize; > again: > buf = g_read_data(cp, offset, blksize, NULL); > if (buf != NULL)
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 206461
: 165905