[OpenWrt-Devel] [PATCH] [libubox] ulog: check if /dev/kmsg is special file

Sergiy Kibrik sakib at meta.ua
Mon Aug 17 16:37:28 EDT 2015


hi John,

> the patch is quite invasive. how about just using "r+"
>
> from the man page -->  "r+     Open for reading and writing.  The stream
> is positioned at the beginning of the file."
>
> could you try the following and not apply any other changes ?
>
> 	John
>
> -	if ((kmsg = fopen("/dev/kmsg", "w")) != NULL) {
> +	if ((kmsg = fopen("/dev/kmsg", "r+")) != NULL) {

should we go on without check for character special flag then?

--
regards,
Sergey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 361 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150817/bd868e05/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list