diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 19e85a20..975ae61f 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -1090,7 +1090,7 @@ dvr_init(void) struct stat st; uint32_t u32; dvr_config_t *cfg; - + dvr_iov_max = sysconf(_SC_IOV_MAX); /* Default settings */ @@ -1134,8 +1134,10 @@ dvr_init(void) htsmsg_get_u32(m, "retention-days", &cfg->dvr_retention_days); tvh_str_set(&cfg->dvr_storage, htsmsg_get_str(m, "storage")); -// Convert 0xxx format permission strings to integer for internal use -// Note no checking that strtol won't overflow int - this should never happen with three-digit numbers +/* + * Convert 0xxx format permission strings to integer for internal use + * Note no checking that strtol won't overflow int - this should never happen with three-digit numbers + */ if ((s = htsmsg_get_str(m, "file-permissions"))) cfg->dvr_muxcnf.m_file_permissions = (int)strtol(s,NULL,0); @@ -1371,7 +1373,7 @@ dvr_save(dvr_config_t *cfg) htsmsg_add_str(m, "config_name", cfg->dvr_config_name); htsmsg_add_str(m, "storage", cfg->dvr_storage); -// Convert permissions to 0xxx octal format and output +/* Convert permissions to 0xxx octal format and output */ snprintf(buffer,sizeof(buffer),"%04o",cfg->dvr_muxcnf.m_file_permissions); htsmsg_add_str(m, "file-permissions", buffer); diff --git a/src/muxer.h b/src/muxer.h index 1f85822f..1c0a85ae 100644 --- a/src/muxer.h +++ b/src/muxer.h @@ -47,8 +47,12 @@ typedef enum { typedef struct muxer_config { int m_flags; muxer_cache_type_t m_cache; -// directory_permissions should really be in dvr.h as it's not really needed for the muxer -// but it's kept with file_permissions for neatness + +/* + * directory_permissions should really be in dvr.h as it's not really needed for the muxer + * but it's kept with file_permissions for neatness + */ + int m_file_permissions; int m_directory_permissions; } muxer_config_t; diff --git a/src/muxer/muxer_pass.c b/src/muxer/muxer_pass.c index b9bc3b5e..906099a6 100644 --- a/src/muxer/muxer_pass.c +++ b/src/muxer/muxer_pass.c @@ -378,7 +378,7 @@ pass_muxer_open_file(muxer_t *m, const char *filename) int fd; pass_muxer_t *pm = (pass_muxer_t*)m; - tvhlog(LOG_DEBUG, "pass", "Creating file \"%s\" with file permissions \"%o\"", filename, pm->m_config.m_file_permissions); + tvhtrace("pass", "Creating file \"%s\" with file permissions \"%o\"", filename, pm->m_config.m_file_permissions); fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, pm->m_config.m_file_permissions); diff --git a/src/muxer/tvh/mkmux.c b/src/muxer/tvh/mkmux.c index 35b03507..5f366717 100644 --- a/src/muxer/tvh/mkmux.c +++ b/src/muxer/tvh/mkmux.c @@ -1050,7 +1050,7 @@ mk_mux_open_file(mk_mux_t *mkm, const char *filename, int permissions) { int fd; - tvhlog(LOG_DEBUG, "mkv", "Creating file \"%s\" with file permissions \"%o\"", filename, permissions); + tvhtrace("mkv", "Creating file \"%s\" with file permissions \"%o\"", filename, permissions); fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, permissions); diff --git a/src/utils.c b/src/utils.c index 6eab4ec7..8ec429da 100644 --- a/src/utils.c +++ b/src/utils.c @@ -397,7 +397,7 @@ makedirs ( const char *inpath, int mode ) path[x] = 0; if (stat(path, &st)) { err = mkdir(path, mode); - tvhlog(LOG_DEBUG, "settings", "Creating directory \"%s\" with octal permissions \"%o\"", path, mode); + tvhtrace("settings", "Creating directory \"%s\" with octal permissions \"%o\"", path, mode); } else { err = S_ISDIR(st.st_mode) ? 0 : 1; errno = ENOTDIR; diff --git a/src/webui/extjs.c b/src/webui/extjs.c index 9ddb549b..fa50e6be 100755 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -1128,7 +1128,7 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque) htsmsg_add_str(r, "storage", cfg->dvr_storage); htsmsg_add_str(r, "container", muxer_container_type2txt(cfg->dvr_mc)); -// Convert integer permissions to an octal-format 0xxx string and store it in the config file +/* Convert integer permissions to an octal-format 0xxx string and store it in the config file */ snprintf(buffer,sizeof(buffer),"%04o",cfg->dvr_muxcnf.m_file_permissions); htsmsg_add_str(r, "filePermissions", buffer); @@ -1176,8 +1176,10 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque) if((s = http_arg_get(&hc->hc_req_args, "container")) != NULL) dvr_container_set(cfg,s); -// Convert 0xxx format permission strings to integer for internal use -// Note no checking that strtol won't overflow int - this should never happen with three-digit numbers +/* + * Convert 0xxx format permission strings to integer for internal use + * Note no checking that strtol won't overflow int - this should never happen with three-digit numbers + */ if((s = http_arg_get(&hc->hc_req_args, "filePermissions")) != NULL) dvr_file_permissions_set(cfg,(int)strtol(s,NULL,0));