*/
#define _GNU_SOURCE
-#define AUC_VERSION "0.1.3"
+#define AUC_VERSION "0.1.4"
#include <fcntl.h>
#include <dlfcn.h>
static int retry, imagebuilder, building, ibready;
static char *board_name = NULL;
static char *target = NULL;
-static char *distribution = NULL, *version = NULL;
+static char *distribution = NULL, *version = NULL, *revision = NULL;
static int uptodate;
static char *filename = NULL;
static int rc;
enum {
RELEASE_DISTRIBUTION,
RELEASE_VERSION,
+ RELEASE_REVISION,
RELEASE_TARGET,
__RELEASE_MAX,
};
static const struct blobmsg_policy release_policy[__RELEASE_MAX] = {
[RELEASE_DISTRIBUTION] = { .name = "distribution", .type = BLOBMSG_TYPE_STRING },
[RELEASE_VERSION] = { .name = "version", .type = BLOBMSG_TYPE_STRING },
+ [RELEASE_REVISION] = { .name = "revision", .type = BLOBMSG_TYPE_STRING },
[RELEASE_TARGET] = { .name = "target", .type = BLOBMSG_TYPE_STRING },
};
blobmsg_parse(release_policy, __RELEASE_MAX, rel,
blobmsg_data(tb[BOARD_RELEASE]), blobmsg_data_len(tb[BOARD_RELEASE]));
- if (!rel[RELEASE_TARGET]) {
- fprintf(stderr, "No target received\n");
+ if (!rel[RELEASE_TARGET] ||
+ !rel[RELEASE_DISTRIBUTION] ||
+ !rel[RELEASE_VERSION] ||
+ !rel[RELEASE_REVISION]) {
+ fprintf(stderr, "No release information received\n");
rc=-1;
return;
}
target = strdup(blobmsg_get_string(rel[RELEASE_TARGET]));
-
distribution = strdup(blobmsg_get_string(rel[RELEASE_DISTRIBUTION]));
version = strdup(blobmsg_get_string(rel[RELEASE_VERSION]));
+ revision = strdup(blobmsg_get_string(rel[RELEASE_REVISION]));
blobmsg_add_string(buf, "distro", distribution);
blobmsg_add_string(buf, "target", target);
blobmsg_add_string(buf, "version", version);
+ blobmsg_add_string(buf, "revision", revision);
}
/*