mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-05-31 23:28:32 -04:00
Add QT GUI install program
This commit is contained in:
parent
dd2411d7d4
commit
d148139227
61 changed files with 6850 additions and 75 deletions
|
@ -31,9 +31,6 @@
|
|||
#define VTOYEFI_PART_BYTES (32 * 1024 * 1024)
|
||||
#define VTOYEFI_PART_SECTORS 65536
|
||||
|
||||
#define VTOY_LOG_FILE "log.txt"
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct vtoy_guid
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <linux/limits.h>
|
||||
#include <ventoy_define.h>
|
||||
#include <ventoy_util.h>
|
||||
#include <ventoy_json.h>
|
||||
|
|
|
@ -26,8 +26,10 @@
|
|||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <time.h>
|
||||
#include <linux/limits.h>
|
||||
#include <ventoy_define.h>
|
||||
|
||||
extern char g_log_file[PATH_MAX];
|
||||
static int g_ventoy_log_level = VLOG_DEBUG;
|
||||
static pthread_mutex_t g_log_mutex;
|
||||
|
||||
|
@ -68,7 +70,7 @@ void ventoy_syslog_newline(int level, const char *Fmt, ...)
|
|||
va_end(arg);
|
||||
|
||||
pthread_mutex_lock(&g_log_mutex);
|
||||
fp = fopen(VTOY_LOG_FILE, "a+");
|
||||
fp = fopen(g_log_file, "a+");
|
||||
if (fp)
|
||||
{
|
||||
fprintf(fp, "[%04u/%02u/%02u %02u:%02u:%02u] %s\n",
|
||||
|
@ -96,7 +98,7 @@ void ventoy_syslog_printf(const char *Fmt, ...)
|
|||
va_end(arg);
|
||||
|
||||
pthread_mutex_lock(&g_log_mutex);
|
||||
fp = fopen(VTOY_LOG_FILE, "a+");
|
||||
fp = fopen(g_log_file, "a+");
|
||||
if (fp)
|
||||
{
|
||||
fprintf(fp, "[%04u/%02u/%02u %02u:%02u:%02u] %s",
|
||||
|
@ -129,7 +131,7 @@ void ventoy_syslog(int level, const char *Fmt, ...)
|
|||
va_end(arg);
|
||||
|
||||
pthread_mutex_lock(&g_log_mutex);
|
||||
fp = fopen(VTOY_LOG_FILE, "a+");
|
||||
fp = fopen(g_log_file, "a+");
|
||||
if (fp)
|
||||
{
|
||||
fprintf(fp, "[%04u/%02u/%02u %02u:%02u:%02u] %s",
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#ifndef __VENTOY_UTIL_H__
|
||||
#define __VENTOY_UTIL_H__
|
||||
|
||||
extern char g_log_file[PATH_MAX];
|
||||
extern char g_ini_file[PATH_MAX];
|
||||
|
||||
#define check_free(p) if (p) free(p)
|
||||
#define vtoy_safe_close_fd(fd) \
|
||||
{\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue