49 "<image> [<image>...]" );
77 for ( i =
optind ; i < argc ; i++ ) {
89 if ( frag_len >
sizeof ( buf ) )
90 frag_len =
sizeof ( buf );
98 for ( j = 0 ; j <
sizeof ( digest_out ) ; j++ )
99 printf (
"%02x", digest_out[j] );
struct arbelprm_rc_send_wqe rc
static void digest_update(struct digest_algorithm *digest, void *ctx, const void *data, size_t len)
int printf(const char *fmt,...)
Write a formatted string to the console.
userptr_t data
Raw file image.
static struct option_descriptor digest_opts[]
"digest" option list
int optind
Current option index.
FILE_LICENCE(GPL2_OR_LATER)
static void digest_final(struct digest_algorithm *digest, void *ctx, void *out)
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
struct command md5sum_command __command
static struct command_descriptor digest_cmd
"digest" command descriptor
static int md5sum_exec(int argc, char **argv)
Parse command-line options.
#define MAX_ARGUMENTS
No maximum number of arguments.
static void digest_init(struct digest_algorithm *digest, void *ctx)
size_t len
Length of raw file image.
Command line option parsing.
const char * name
Name of the command.
static int digest_exec(int argc, char **argv, struct digest_algorithm *digest)
The "digest" command.
size_t ctxsize
Context size.
size_t digestsize
Digest size.
A command-line option descriptor.
A message digest algorithm.
static int sha1sum_exec(int argc, char **argv)
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
uint16_t offset
Offset to command line.
static union @438 opts
"cert<xxx>" option list
int imgacquire(const char *name_uri, unsigned long timeout, struct image **image)
Acquire an image.
struct digest_algorithm md5_algorithm
MD5 algorithm.
struct digest_algorithm sha1_algorithm
SHA-1 algorithm.