aboutsummaryrefslogtreecommitdiffstats
path: root/drminfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drminfo.c')
-rw-r--r--drminfo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drminfo.c b/drminfo.c
index ebadb80..c211ea2 100644
--- a/drminfo.c
+++ b/drminfo.c
@@ -462,6 +462,7 @@ static void usage(FILE *fp)
enum {
OPT_LONG_LEASE = 0x100,
OPT_LONG_COMP_BASH,
+ OPT_LONG_COMP_CARD,
};
static struct option long_opts[] = {
@@ -511,6 +512,10 @@ static struct option long_opts[] = {
.has_arg = false,
.val = OPT_LONG_COMP_BASH,
},{
+ .name = "complete-card",
+ .has_arg = false,
+ .val = OPT_LONG_COMP_CARD,
+ },{
/* --- with argument --- */
.name = "card",
@@ -591,6 +596,9 @@ int main(int argc, char **argv)
case OPT_LONG_COMP_BASH:
complete_bash("drminfo", long_opts);
exit(0);
+ case OPT_LONG_COMP_CARD:
+ complete_device_nr("/dev/dri/card");
+ exit(0);
case 'h':
usage(stdout);
exit(0);