/***
This file is part of systemd.
Copyright 2014 Ivan Shapovalov
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
#include <stdio.h>
#include "alloc-util.h"
#include "fileio.h"
#include "log.h"
#include "util.h"
const char *device;
int r;
if (argc != 2) {
log_error("This program expects one argument.");
return EXIT_FAILURE;
}
log_open();
umask(0022);
/* Refuse to run unless we are in an initrd() */
if (!in_initrd())
return EXIT_SUCCESS;
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
log_oom();
return EXIT_FAILURE;
}
if (r < 0) {
return EXIT_FAILURE;
}
/*
* The write above shall not return.
*
* However, failed resume is a normal condition (may mean that there is
* no hibernation image).
*/
return EXIT_SUCCESS;
}