Contents of /trunk/mkinitrd-magellan/klibc/usr/kinit/resume/resume.c
Parent Directory | Revision Log
Revision 815 -
(show annotations)
(download)
Fri Apr 24 18:32:46 2009 UTC (15 years, 5 months ago) by niro
File MIME type: text/plain
File size: 411 byte(s)
Fri Apr 24 18:32:46 2009 UTC (15 years, 5 months ago) by niro
File MIME type: text/plain
File size: 411 byte(s)
-updated to klibc-1.5.15
1 | /* |
2 | * Handle resume from suspend-to-disk |
3 | */ |
4 | |
5 | #include <stdio.h> |
6 | #include <stdlib.h> |
7 | |
8 | #include "resume.h" |
9 | |
10 | char *progname; |
11 | |
12 | static __noreturn usage(void) |
13 | { |
14 | fprintf(stderr, "Usage: %s /dev/<resumedevice> [offset]\n", progname); |
15 | exit(1); |
16 | } |
17 | |
18 | int main(int argc, char *argv[]) |
19 | { |
20 | progname = argv[0]; |
21 | if (argc < 2 || argc > 3) |
22 | usage(); |
23 | |
24 | return resume(argv[1], (argc > 2) ? strtoull(argv[2], NULL, 0) : 0ULL); |
25 | } |