Skip to content

Commit

Permalink
Log the chosen ro/rw mode at startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
trekawek committed Jul 7, 2024
1 parent bbb20a9 commit 0a3c642
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/auth.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "auth.h"
#include "tnfs.h"
#include "tnfs_file.h"
#include <stdio.h>

int RW_CMDS[] =
{
Expand Down
8 changes: 8 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ int main(int argc, char **argv)
const char *version = "24.0522.1";

LOG("Starting tnfsd version %s on port %d using root directory \"%s\"\n", version, port, argv[optind]);
if (enable_writes)
{
LOG("The server runs in read-write mode. TNFS clients can upload and modify files.\n");
}
else
{
LOG("The server runs in read-only mode. TNFS clients can only list and download files. Use -w to enable writes.\n");
}

tnfs_init(); /* initialize structures etc. */
tnfs_init_errtable(); /* initialize error lookup table */
Expand Down

0 comments on commit 0a3c642

Please sign in to comment.