[BusyBox] Re: busybox-cvs Digest, Vol 27, Issue 8

Vladimir N. Oleynik dzo at simtreas.ru
Tue Jun 14 05:52:36 UTC 2005


busybox-cvs-request at busybox.net wrote:

 >  	if (uname(&ut)) {
 > -		perror("uname");
 > -		exit(1);
 > +		bb_perror_msg_and_die("uname");
 >  	}
 >  	linux_version_code = parse_version_number(ut.release);

eq

linux_version_code = get_kernel_revision();

all this like similar a code

 > -	buf = malloc(strlen(str)+1);
 > -	if (!buf)
 > -		return 1;
 > +	buf = xmalloc(strlen(str)+1);
 >  	strcpy(buf, str);

eq

buf = bb_xstrdup(str);

all this like similar a code

 > -		vdirname = malloc(vg_len + strlen(vg_name) + 8);
 > -		if (!vdirname)
 > -			goto exit;
 > +		vdirname = xmalloc(vg_len + strlen(vg_name) + 8);
 >  		sprintf(vdirname, "%s/%s/LVs", VG_DIR, vg_name);

eq

bb_xasprintf(&vdirname, "%s/%s/LVs", VG_DIR, vg_name);


--w
vodz




More information about the busybox mailing list