bin/144644: [patch] Fix *alloc cornercases with config(1)

Garrett Cooper gcooper at FreeBSD.org
Tue Mar 30 11:50:06 UTC 2010


The following reply was made to PR bin/144644; it has been noted by GNATS.

From: Garrett Cooper <gcooper at FreeBSD.org>
To: Ruslan Ermilov <ru at freebsd.org>
Cc: bug-followup at freebsd.org
Subject: Re: bin/144644: [patch] Fix *alloc cornercases with config(1)
Date: Tue, 30 Mar 2010 04:46:28 -0700

 --0016363105b72177dc0483032ec9
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 On Tue, Mar 30, 2010 at 3:34 AM, Ruslan Ermilov <ru at freebsd.org> wrote:
 > On Sun, Mar 21, 2010 at 04:58:18AM -0700, Garrett Cooper wrote:
 >> On Sat, Mar 13, 2010 at 12:36 AM, Garrett Cooper <gcooper at freebsd.org> w=
 rote:
 >> > On Fri, Mar 12, 2010 at 11:28 PM, Garrett Cooper <yanegomi at gmail.com> =
 wrote:
 >> >> =A0 =A0The attached patch addresses the non-style(9) conformity with =
 my
 >> >> previous patch as pointed out by several folks on current at .
 >> >
 >> > Sorry -- missed a spot...
 >>
 >> =A0 =A0 The following patch incorporates a logical change from errx(3) t=
 o
 >> err(3) made by ru@ in an informal review. I also picked up a few other
 >> logical messages that were originally errx(EXIT_ERR, ...) and
 >> converted them to err(EXIT_ERR, ...) in a similar fashion.
 >
 > Part of the changes are invalid (shouldn't have been converted from
 > errx() to err()).
 >
 > : Index: main.c
 > : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > : --- main.c =A0 =A0(revision 205872)
 > : +++ main.c =A0 =A0(working copy)
 > : @@ -120,7 +120,7 @@
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (*destdir =3D=3D '\0')
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 strlcpy(des=
 tdir, optarg, sizeof(destdir));
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else
 > : - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errx(2, "dire=
 ctory already set");
 > : + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 err(EXIT_FAIL=
 URE, "directory already set");
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 case 'g':
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 debugging++;
 > : @@ -175,7 +175,7 @@
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (mkdir(p, 0777))
 > : =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 err(2, "%s", p);
 > : =A0 =A0 =A0 } else if (!S_ISDIR(buf.st_mode))
 > : - =A0 =A0 =A0 =A0 =A0 =A0 errx(2, "%s isn't a directory", p);
 > : + =A0 =A0 =A0 =A0 =A0 =A0 err(EXIT_FAILURE, "%s isn't a directory", p);
 > :
 > : =A0 =A0 =A0 SLIST_INIT(&cputype);
 > : =A0 =A0 =A0 SLIST_INIT(&mkopt);
 > : @@ -519,7 +519,7 @@
 > : =A0 =A0 =A0 =A0*/
 > : =A0 =A0 =A0 p =3D strstr(kernconfstr, KERNCONFTAG);
 > : =A0 =A0 =A0 if (p =3D=3D NULL)
 > : - =A0 =A0 =A0 =A0 =A0 =A0 errx(EXIT_FAILURE, "Something went terribly w=
 rong!");
 > : + =A0 =A0 =A0 =A0 =A0 =A0 err(EXIT_FAILURE, "Something went terribly wr=
 ong!");
 > : =A0 =A0 =A0 *p =3D '\0';
 > : =A0 =A0 =A0 fprintf(fo, "%s", kernconfstr);
 > : =A0 =A0 =A0 fprintf(fo, "%s", sbuf_data(sb));
 > : @@ -671,19 +673,19 @@
 > : [...]
 > : =A0 =A0 =A0 if (S_ISDIR(st.st_mode))
 > : - =A0 =A0 =A0 =A0 =A0 =A0 errx(EXIT_FAILURE, "'%s' is a directory", fil=
 e);
 > : + =A0 =A0 =A0 =A0 =A0 =A0 err(EXIT_FAILURE, "'%s' is a directory", file=
 );
 > : =A0 =A0 =A0 fp =3D fdopen(r, "r");
 > : [...]
 > : =A0 =A0 =A0 pp =3D popen(cmd, "r");
 > : =A0 =A0 =A0 if (pp =3D=3D NULL)
 > : - =A0 =A0 =A0 =A0 =A0 =A0 errx(EXIT_FAILURE, "popen() failed");
 > : + =A0 =A0 =A0 =A0 =A0 =A0 err(EXIT_FAILURE, "popen() failed");
 >
 > This is questionable; see the popen(3) manpage for details,
 > section ERRORS.
 >
 > : Index: lang.l
 > : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > : --- lang.l =A0 =A0(revision 205872)
 > : +++ lang.l =A0 =A0(working copy)
 > : @@ -31,6 +31,7 @@
 > : =A0 * $FreeBSD$
 > : =A0 */
 > :
 > : +#include <err.h>
 >
 > Misplaced include.
 >
 > : =A0#include <assert.h>
 > : =A0#include <ctype.h>
 > : =A0#include <string.h>
 
 Hi Ruslan!
     Thanks for the review! This should resolve all of the issues you
 spotted before, as well as fixes a typo in a comment near one of the
 changes that I spotted before.
 Cheers,
 -Garrett
 
 --0016363105b72177dc0483032ec9
 Content-Type: text/plain; charset=US-ASCII; name="config-failure-corner-cases.diff.txt"
 Content-Disposition: attachment; 
 	filename="config-failure-corner-cases.diff.txt"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_g7en65jh0
 
 SW5kZXg6IG1rb3B0aW9ucy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIG1rb3B0aW9ucy5jCShyZXZpc2lvbiAy
 MDU4NzEpCisrKyBta29wdGlvbnMuYwkod29ya2luZyBjb3B5KQpAQCAtNzAsNiArNzAsOCBAQAog
 CS8qIEZha2UgdGhlIGNwdSB0eXBlcyBhcyBvcHRpb25zLiAqLwogCVNMSVNUX0ZPUkVBQ0goY3As
 ICZjcHV0eXBlLCBjcHVfbmV4dCkgewogCQlvcCA9IChzdHJ1Y3Qgb3B0ICopY2FsbG9jKDEsIHNp
 emVvZigqb3ApKTsKKwkJaWYgKG9wID09IE5VTEwpCisJCQllcnIoRVhJVF9GQUlMVVJFLCAiY2Fs
 bG9jIik7CiAJCW9wLT5vcF9uYW1lID0gbnMoY3AtPmNwdV9uYW1lKTsKIAkJU0xJU1RfSU5TRVJU
 X0hFQUQoJm9wdCwgb3AsIG9wX25leHQpOwogCX0JCkBAIC04NCw2ICs4Niw4IEBACiAKIAkvKiBG
 YWtlIE1BWFVTRVJTIGFzIGFuIG9wdGlvbi4gKi8KIAlvcCA9IChzdHJ1Y3Qgb3B0ICopY2FsbG9j
 KDEsIHNpemVvZigqb3ApKTsKKwlpZiAob3AgPT0gTlVMTCkKKwkJZXJyKEVYSVRfRkFJTFVSRSwg
 ImNhbGxvYyIpOwogCW9wLT5vcF9uYW1lID0gbnMoIk1BWFVTRVJTIik7CiAJc25wcmludGYoYnVm
 LCBzaXplb2YoYnVmKSwgIiVkIiwgbWF4dXNlcnMpOwogCW9wLT5vcF92YWx1ZSA9IG5zKGJ1Zik7
 CkBAIC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MSwgc2l6ZW9mICpubCk7CisJaWYgKG5sID09IE5VTEwpCisJ
 CWVycihFWElUX0ZBSUxVUkUsICJjYWxsb2MiKTsKIAlubC0+Zl9uYW1lID0gbmFtZTsKIAlTVEFJ
 TFFfSU5TRVJUX1RBSUwoJmZudGFiLCBubCwgZl9uZXh0KTsKIH0KQEAgLTM2NCw2ICszNzAsOCBA
 QAogCX0KIAogCW5wID0gKHN0cnVjdCBkZXZpY2UgKikgY2FsbG9jKDEsIHNpemVvZiAqbnApOwor
 CWlmIChucCA9PSBOVUxMKQorCQllcnIoRVhJVF9GQUlMVVJFLCAiY2FsbG9jIik7CiAJbnAtPmRf
 bmFtZSA9IG5hbWU7CiAJU1RBSUxRX0lOU0VSVF9UQUlMKCZkdGFiLCBucCwgZF9uZXh0KTsKIH0K
 QEAgLTQyMiw2ICs0MzAsOCBAQAogCX0KIAogCW9wID0gKHN0cnVjdCBvcHQgKiljYWxsb2MoMSwg
 c2l6ZW9mIChzdHJ1Y3Qgb3B0KSk7CisJaWYgKG9wID09IE5VTEwpCisJCWVycihFWElUX0ZBSUxV
 UkUsICJjYWxsb2MiKTsKIAlvcC0+b3BfbmFtZSA9IG5hbWU7CiAJb3AtPm9wX293bmZpbGUgPSAw
 OwogCW9wLT5vcF92YWx1ZSA9IHZhbHVlOwo=
 --0016363105b72177dc0483032ec9--


More information about the freebsd-bugs mailing list