diff options
-rw-r--r-- | bin/nv_init.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/nv_init.c b/bin/nv_init.c index 0f901a4c7..548e55150 100644 --- a/bin/nv_init.c +++ b/bin/nv_init.c @@ -14,10 +14,17 @@ struct nouveau_object *device; int main(int argc, char **argv) { + bool suspend = false, wait = false; int ret, c; - while ((c = getopt(argc, argv, "-")) != -1) { + while ((c = getopt(argc, argv, "-sw")) != -1) { switch (c) { + case 's': + suspend = true; + break; + case 'w': + wait = true; + break; case 1: return -EINVAL; } @@ -36,6 +43,15 @@ main(int argc, char **argv) if (ret) return ret; + if (suspend) { + os_suspend(); + os_resume(); + } + + while (wait && (c = getchar()) == EOF) { + sched_yield(); + } + os_client_del(&client); nouveau_object_debug(); return ret; |