diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-12-17 13:47:03 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-03-01 16:38:16 +0100 |
commit | de6168e331435bc22a931fa82f82401e774f4e5d (patch) | |
tree | ea5f12ae23209d1feaae768ddb2a25c3b6840a73 | |
parent | 86b76c6d43a3ea87c00235f2961d71002d4c4792 (diff) | |
download | genimage-de6168e331435bc22a931fa82f82401e774f4e5d.tar.gz genimage-de6168e331435bc22a931fa82f82401e774f4e5d.tar.xz |
genimage: support absolute output file names
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | genimage.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -668,7 +668,11 @@ int main(int argc, char *argv[]) image->mountpoint = cfg_getstr(imagesec, "mountpoint"); image->exec_pre = cfg_getstr(imagesec, "exec-pre"); image->exec_post = cfg_getstr(imagesec, "exec-post"); - xasprintf(&image->outfile, "%s/%s", imagepath(), image->file); + if (image->file[0] == '/') + image->outfile = strdup(image->file); + else + xasprintf(&image->outfile, "%s/%s", imagepath(), + image->file); if (image->mountpoint && *image->mountpoint == '/') image->mountpoint++; str = cfg_getstr(imagesec, "flashtype"); |