Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
DemiMarie committed Mar 11, 2023
1 parent b67f578 commit 581fbc2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions not-script/not-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ static int setup_loop(struct loop_context *ctx,
uint64_t sizelimit,
bool writable,
const char *path) {
warn("Setting up path %s (via FD %" PRIu32 ") with offset 0x%" PRIx64 " and size limit 0x%" PRIx64 " as %s",
fprintf(stderr, "Setting up path %s (via FD %" PRIu32 ") with offset 0x%" PRIx64 " and size limit 0x%" PRIx64 " as %s\n",
path, fd, offset, sizelimit, writable ? "writable" : "read-only");
fflush(NULL);
struct loop_config config = {
.fd = fd,
.block_size = 0, /* FIXME! */
Expand Down Expand Up @@ -293,11 +294,13 @@ int main(int argc, char **argv)
switch (rw[0]) {
case 'r':
writable = false;
warn("XenStore key %s specifies read-only", xenstore_path_buffer);
fprintf(stderr, "XenStore key %s specifies read-only\n", xenstore_path_buffer);
fflush(NULL);
break;
case 'w':
writable = true;
warn("XenStore key %s specifies writable", xenstore_path_buffer);
fprintf(stderr, "XenStore key %s specifies writable\n", xenstore_path_buffer);
fflush(NULL);
break;
default:
len = 0;
Expand Down

0 comments on commit 581fbc2

Please sign in to comment.