diff options
author | eota <none@none> | 2006-11-01 17:16:56 -0800 |
---|---|---|
committer | eota <none@none> | 2006-11-01 17:16:56 -0800 |
commit | 44dc7d114800c45c22c623ec0ee6a468f2a5b11b (patch) | |
tree | 31f41ec76c3b0f47473dfab2128f1944968fda34 /usr/src/lib/lvm | |
parent | 259d4401ef09013b381b479f0b1f0d90ed0fa863 (diff) | |
download | illumos-joyent-44dc7d114800c45c22c623ec0ee6a468f2a5b11b.tar.gz |
6484320 libsvm error causes md driver panic when jumpstarting snv_50 with a profile that includes SVM setup
6486178 mdattach failures can lead to panics when mddetach processing occurs
Diffstat (limited to 'usr/src/lib/lvm')
-rw-r--r-- | usr/src/lib/lvm/libsvm/common/metaconf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/lib/lvm/libsvm/common/metaconf.c b/usr/src/lib/lvm/libsvm/common/metaconf.c index 11bca39ed8..aed1fcd491 100644 --- a/usr/src/lib/lvm/libsvm/common/metaconf.c +++ b/usr/src/lib/lvm/libsvm/common/metaconf.c @@ -93,6 +93,9 @@ write_targ_nm_table(char *path) while (fgets(buf, PATH_MAX, targfp) != NULL && (retval == RET_SUCCESS)) { + /* remove a new-line character for md_targ_nm_table */ + if ((cp = strchr(buf, '\n')) != NULL) + *cp = 0; /* cut off comments starting with '#' */ if ((cp = strchr(buf, '#')) != NULL) *cp = 0; @@ -103,9 +106,10 @@ write_targ_nm_table(char *path) if (fprintf(mdfp, "md_targ_nm_table=\"%s\"", buf) < 0) retval = RET_ERROR; first_entry = 0; + } else { + if (fprintf(mdfp, ",\"%s\"", buf) < 0) + retval = RET_ERROR; } - if (fprintf(mdfp, ",\"%s\"", buf) < 0) - retval = RET_ERROR; } if (!first_entry) if (fprintf(mdfp, ";\n") < 0) |