From e267f2307d5756c44c81c4bfb5de89ad7326bcc8 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 15 Jan 2023 12:39:02 +0000 Subject: Add -F option --- stty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stty.c b/stty.c index 48c8100..15b5860 100644 --- a/stty.c +++ b/stty.c @@ -82,6 +82,10 @@ main(int argc, char *argv[]) if ((i.fd = open(optarg, O_RDONLY | O_NONBLOCK)) < 0) err(1, "%s", optarg); break; + case 'F': + if ((i.fd = open(optarg, O_RDONLY | O_NONBLOCK)) < 0) + err(1, "%s", optarg); + break; case 'g': fmt = GFLAG; break; @@ -157,6 +161,6 @@ void usage(void) { - (void)fprintf(stderr, "usage: stty [-a|-e|-g] [-f file] [options]\n"); + (void)fprintf(stderr, "usage: stty [-a|-e|-g] [-f/-F file] [options]\n"); exit (1); } -- cgit v1.2.1