Magellan Linux

Annotation of /trunk/mkinitrd-magellan/klibc/usr/kinit/resume/resume.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (hide annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 425 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 niro 532 /*
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[], char *envp[])
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     }