diff options
author | midipix <writeonce@midipix.org> | 2016-07-17 04:35:19 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-07-21 03:47:29 -0400 |
commit | d881b6e81e20267c192f6c05c628eecd061b0f42 (patch) | |
tree | 530f97dbee47749705d8057c4f9e5a9410ed27ab /src/driver | |
parent | acafe9829b0534d0b052f7382c77ea7fc753260c (diff) | |
download | ptycon-d881b6e81e20267c192f6c05c628eecd061b0f42.tar.bz2 ptycon-d881b6e81e20267c192f6c05c628eecd061b0f42.tar.xz |
driver: added --sysroot support.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/ptyc_driver_ctx.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/driver/ptyc_driver_ctx.c b/src/driver/ptyc_driver_ctx.c index 459abe2..dfaa572 100644 --- a/src/driver/ptyc_driver_ctx.c +++ b/src/driver/ptyc_driver_ctx.c @@ -292,6 +292,10 @@ int ptyc_get_driver_ctx( nunits++; break; + case TAG_SYSROOT: + cctx.sysroot = entry->arg; + break; + case TAG_WAIT: cctx.drvflags |= PTYC_DRIVER_DBG_WAIT; break; @@ -301,6 +305,14 @@ int ptyc_get_driver_ctx( return ptyc_driver_usage(program,0,options,meta); } + if (cctx.sysroot && ptyc_open_dir(&cctx.hroot,0,cctx.sysroot,false)) { + if (flags & PTYC_DRIVER_VERBOSITY_ERRORS) + fprintf(stderr, + "%s: error: could not open sysroot directory '%s'", + program,cctx.sysroot); + return ptyc_get_driver_ctx_fail(meta); + } + if (!(ctx = ptyc_driver_ctx_alloc(meta,&cctx,nunits))) return ptyc_get_driver_ctx_fail(meta); |