diff options
Diffstat (limited to 'usr/kinit/resume/resume.c')
-rw-r--r-- | usr/kinit/resume/resume.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/usr/kinit/resume/resume.c b/usr/kinit/resume/resume.c new file mode 100644 index 0000000..2138078 --- /dev/null +++ b/usr/kinit/resume/resume.c @@ -0,0 +1,25 @@ +/* + * Handle resume from suspend-to-disk + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "resume.h" + +char *progname; + +static __noreturn usage(void) +{ + fprintf(stderr, "Usage: %s /dev/<resumedevice> [offset]\n", progname); + exit(1); +} + +int main(int argc, char *argv[]) +{ + progname = argv[0]; + if (argc < 2 || argc > 3) + usage(); + + return resume(argv[1], (argc > 2) ? strtoull(argv[2], NULL, 0) : 0ULL); +} |