aboutsummaryrefslogtreecommitdiffstats
path: root/fbinfo.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-01-02 15:19:36 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-01-02 15:19:36 +0100
commit3d93e43f45807eda548f17c3ef7b61823a614972 (patch)
tree70821e8cdf6f56986130316bb1a712be92949c87 /fbinfo.c
parent30ac6fed46b7f8080920310993d14a40afa7649d (diff)
downloaddrminfo-3d93e43f45807eda548f17c3ef7b61823a614972.tar.gz
card & fbdev completion
Diffstat (limited to 'fbinfo.c')
-rw-r--r--fbinfo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fbinfo.c b/fbinfo.c
index e3f3bf7..14b8f97 100644
--- a/fbinfo.c
+++ b/fbinfo.c
@@ -32,6 +32,7 @@ static void usage(FILE *fp)
enum {
OPT_LONG_COMP_BASH = 0x100,
+ OPT_LONG_COMP_FBDEV,
};
static struct option long_opts[] = {
@@ -45,6 +46,10 @@ static struct option long_opts[] = {
.has_arg = false,
.val = OPT_LONG_COMP_BASH,
},{
+ .name = "complete-fbdev",
+ .has_arg = false,
+ .val = OPT_LONG_COMP_FBDEV,
+ },{
/* --- with argument --- */
.name = "fbdev",
@@ -71,6 +76,9 @@ int main(int argc, char **argv)
case OPT_LONG_COMP_BASH:
complete_bash("fbinfo", long_opts);
exit(0);
+ case OPT_LONG_COMP_FBDEV:
+ complete_device_nr("/dev/fb");
+ exit(0);
case 'h':
usage(stdout);
exit(0);