X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=lib%2Fpb-protocol%2Fpb-protocol.c;h=69c9bfea63e5017051e9a66509c9aa9fc36c02bc;hb=08b9b747db92ce682e094ef86f48321d29fc44d6;hp=4daeb5a3bc35510a757ccf76f9e13bb3f8c12aab;hpb=8cb7063b23c1ec7a712270e6e264a3b2e0ab80a2;p=petitboot diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c index 4daeb5a..69c9bfe 100644 --- a/lib/pb-protocol/pb-protocol.c +++ b/lib/pb-protocol/pb-protocol.c @@ -58,6 +58,17 @@ struct boot_option *boot_option_copy(void* ctx, const struct boot_option *opt) return new; } +int pb_protocol_device_cmp(const struct device *a, const struct device *b) +{ + return !strcmp(a->id, b->id); +} + +int pb_protocol_boot_option_cmp(const struct boot_option *a, + const struct boot_option *b) +{ + return !strcmp(a->id, b->id); +} + /* Write a string into the buffer, starting at pos. * * Returns the total length used for the write, including length header.