From 59b920bb87eab928e77b5227a1ed9023292a7552 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 29 May 2025 00:53:15 +0000 Subject: driver: become multi-cmd ready, added pe_cmd_perk(). --- include/perk/perk.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') 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 *); -- cgit v1.2.3