All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Marius Kittler <mkittler@suse.de>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v8 1/4] Refactor ioctl02.c to use the new test API
Date: Thu, 26 Oct 2023 00:09:19 +0200	[thread overview]
Message-ID: <20231025220919.GC477570@pevik> (raw)
In-Reply-To: <20231025220605.GB477570@pevik>

Hi Marius,

> > -	if (ioctl(cfd, TCFLSH, 2) < 0) {
> > -		tst_resm(TINFO, "ioctl TCFLSH failed. : errno = %d", errno);
> > -		/* signal the parent so we don't hang the test */
> > -		kill(parentpid, SIGUSR1);
> > -		return -1;
> > -	}
> > +	SAFE_IOCTL(cfd, TCFLSH, 2);
> 2 is for flushing both Rx and Tx, right?
> Maybe we could use TCIOFLUSH, right? At least it's documented in
> include/uapi/asm-generic/termbits-common.h. TCIOFLUSH is in glibc, musl and
> uclibc-ng thus safe to use.

And, more importantly, TCIOFLUSH is mentioned in man ioctl_tty(2) and
termios(3). Using constant is kind of self explaining.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-10-25 22:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 11:08 [LTP] [PATCH v8 0/4] Improve ioctl02.c Marius Kittler
2023-10-25 11:08 ` [LTP] [PATCH v8 1/4] Refactor ioctl02.c to use the new test API Marius Kittler
2023-10-25 22:06   ` Petr Vorel
2023-10-25 22:09     ` Petr Vorel [this message]
2023-10-25 22:20     ` Petr Vorel
2023-10-25 22:23       ` Petr Vorel
2023-10-25 11:08 ` [LTP] [PATCH v8 2/4] Make checks for termio flags more strict Marius Kittler
2023-10-25 22:31   ` Petr Vorel
2023-10-25 11:08 ` [LTP] [PATCH v8 3/4] Remove disabled code in ioctl02.c Marius Kittler
2023-10-25 22:22   ` Petr Vorel
2023-10-25 11:08 ` [LTP] [PATCH v8 4/4] Extend ioctl02 to test termio and termios Marius Kittler
2023-10-25 22:13   ` Petr Vorel
2023-10-26  6:34     ` iob via ltp
2023-10-26  8:35       ` Petr Vorel
2023-10-25 21:26 ` [LTP] [PATCH v8 0/4] Improve ioctl02.c Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231025220919.GC477570@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mkittler@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.