diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-09 12:56:00 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-09 12:56:00 -0600 |
commit | e14d37a1ce054b06398c4f3971346a229b6c58c4 (patch) | |
tree | 25928f9bc99aeac6b720744f3ee31eadab619f52 | |
parent | a9bbf3ac4c4924169eb1e9a45272b95784bd393b (diff) | |
download | image-e14d37a1ce054b06398c4f3971346a229b6c58c4.tar.gz image-e14d37a1ce054b06398c4f3971346a229b6c58c4.tar.bz2 image-e14d37a1ce054b06398c4f3971346a229b6c58c4.tar.xz image-e14d37a1ce054b06398c4f3971346a229b6c58c4.zip |
CD init: actually use squashroot param
-rw-r--r-- | cdinit.c | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -33,23 +33,8 @@ */ const char *get_param(const char *param, const char *def) { - int cmd_fd; - - if(access("/proc/cmdline", R_OK) != 0) - { - fprintf(stderr, "can't access kernel command line\n"); - return def; - } - - cmd_fd = open("/proc/cmdline", O_RDONLY); - if(cmd_fd == -1) - { - fprintf(stderr, "can't open kernel command line\n"); - return def; - } - - close(cmd_fd); - return def; + char *str = getenv(param); + return str ? str : def; } /*! |