On 2017-11-03 16:55, [ext] Andreas J. Reichel wrote:
> From: Andreas Reichel <[email protected]>
> 
> Store user variable types as uint64_t instead of a string. This enables
> the possibility of definint flags. Flags are used to delete a user
> variable (to destinguish between setting it empty or removing it) and to
> mark variables with special properties. This will be used in a following
> commit to define global user variables.
> 
> Bits 0..31 are reserved for standard datatype definitions,
> bits 32..48 are reserved for user defined datatypes or flags,
> bits 49..63 are reserved for internal flags.
> 
> Signed-off-by: Andreas Reichel <[email protected]>

...

> @@ -367,17 +361,18 @@ static error_t parse_opt(int key, char *arg, struct 
> argp_state *state)
>  
>  static void dump_uservars(uint8_t *udata)
>  {
> -     char *key, *value, *type;
> +     char *key, *value;
> +     uint64_t type;
>       uint32_t rsize, dsize;
>  
>       while (*udata) {
>               bgenv_map_uservar(udata, &key, &type, (uint8_t **)&value,
>                                 &rsize, &dsize);
>               printf("%s ", key);
> -             if (strcmp(type, USERVAR_TYPE_DEFAULT) == 0) {
> +             if ((type & 0x00000000FFFFFFFF) == USERVAR_TYPE_STRING_ASCII) {
>                       printf("= %s\n", value);
>               } else {
> -                     printf("( User defined type )\n");
> +                     printf("( Type is not ASCII )\n");

Can't we also dump standard integer types? Can be done on top later on,
though.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/3b4ff5a8-da6f-b9aa-6877-65c12322f0a2%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to