Re: [PATCH] Some minor CLD test program fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 27 Nov 2009 15:20:36 -0800
cmccabe@xxxxxxxxxxxxxx wrote:

> When doing a raw read(2) in cld_readport(), resume after EINTR.
> Also resume if we read less than the requested amount.

>  	if ((fd = open(fname, O_RDONLY)) == -1)
>  		return -errno;
> -	rc = read(fd, buf, LEN);
> +	memset(buf, 0, sizeof(buf));
> +	rc = safe_read(fd, buf, LEN);
>  	close(fd);

I don't think it's necessary when reading from a file.

> In the test programs, call g_thread_init() before cldc_init().
> cldc_init has a
> stern warning to "call cldc_init after g_thread_init, if present."

This may be a prudent thing to do, I just forgot about the
tests when I planned this.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux