[PATCH] xf86-input-synaptics: fix creation of repeater fifo

Peter Hutterer peter.hutterer at who-t.net
Sun Sep 28 05:55:58 PDT 2008


On Sun, Sep 28, 2008 at 10:09:01AM +0100, Magnus Kessler wrote:
> The creation of the repeater fifo in the synaptics driver looks dubious. The 
> file mode should be ORed with the S_IFIFO flag and the dev parameter should 
> be null. The mknod(3p) man page suggests using mkfifo instead.

Agreed.

>[...]
>     repeater = xf86SetStrOption(local->options, "Repeater", NULL);
>     if (repeater) {
> 	/* create repeater fifo */
>-	status = mknod(repeater, 666, S_IFIFO);
>-	if ((status != 0) && (status != EEXIST)) {
>+	if (mkfifo(repeater, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IWOTH|S_IROTH)) {
> 	    xf86Msg(X_ERROR, "%s can't create repeater fifo\n", local->name);
> 	} else {
> 	    /* open the repeater fifo */


Any special reason for dropping the EEXIST case?

Cheers,
  Peter



More information about the xorg mailing list