diff options
author | midipix <writeonce@midipix.org> | 2025-05-29 00:53:15 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-05-29 03:35:46 +0000 |
commit | 59b920bb87eab928e77b5227a1ed9023292a7552 (patch) | |
tree | df0f396edc1cec2156f5ee7d543b39ed05e20a4b /include | |
parent | bbc6acc8f263e26cd487b936ee5ab7a61b59b277 (diff) | |
download | perk-59b920bb87eab928e77b5227a1ed9023292a7552.tar.bz2 perk-59b920bb87eab928e77b5227a1ed9023292a7552.tar.xz |
driver: become multi-cmd ready, added pe_cmd_perk().
Diffstat (limited to 'include')
-rw-r--r-- | include/perk/perk.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h index 17e0332..65cbd62 100644 --- a/include/perk/perk.h +++ b/include/perk/perk.h @@ -64,6 +64,12 @@ enum pe_custom_error { PERK_ERR_CAP, }; +enum pe_cmd { + PERK_CMD_DEFAULT, + PERK_CMD_PERK, + PERK_CMD_CAP, +}; + struct pe_raw_image; struct pe_raw_image_dos_hdr; struct pe_raw_coff_image_hdr; @@ -165,6 +171,7 @@ struct pe_common_ctx { uint64_t actflags; uint64_t fmtflags; uint64_t hdrdump; + enum pe_cmd cmd; }; struct pe_driver_ctx { @@ -202,6 +209,9 @@ perk_api void pe_free_unit_ctx (struct pe_unit_ctx *); perk_api int pe_get_driver_fdctx (const struct pe_driver_ctx *, struct pe_fd_ctx *); perk_api int pe_set_driver_fdctx (struct pe_driver_ctx *, const struct pe_fd_ctx *); +/* cmd api */ +perk_api int pe_cmd_perk (const struct pe_driver_ctx *, const char *); + /* utility api */ perk_api int pe_main (char **, char **, const struct pe_fd_ctx *); |