Added option to not write to restore file and fixed a lot of restore file issues
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
#define OP_VERSION 254
|
||||
#define OP_USAGE 255
|
||||
|
||||
#define ARG_FLAG_NONE 0
|
||||
#define ARG_FLAG_NO_SAVE 1
|
||||
|
||||
struct cmd_arg{
|
||||
const char* lopt;
|
||||
const char* sopt;
|
||||
@@ -48,7 +51,11 @@ struct arg_values{
|
||||
//NULL means all devices
|
||||
const char* device;
|
||||
|
||||
//What value to put in the backlight file
|
||||
//starting brightness
|
||||
int act_start;
|
||||
//value to write in backlight file
|
||||
int act_delta;
|
||||
//output percentage
|
||||
float delta;
|
||||
|
||||
//How many seconds to transition
|
||||
@@ -60,6 +67,7 @@ struct arg_values{
|
||||
int operation;
|
||||
int num_values;
|
||||
};
|
||||
int flags;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include "common.h"
|
||||
#include "cmd.h"
|
||||
|
||||
void save_restore_file(struct string_array* devices);
|
||||
int restore_to_delta(struct arg_values* curr, RJP_value** root, int* try_restore);
|
||||
void save_restore_file(struct string_array* devices, struct arg_values* args);
|
||||
int restore_to_delta(struct arg_values* curr);
|
||||
void prep_restore(struct arg_values* a);
|
||||
RJP_value* find_matching_json_device(const char* name, RJP_value* root);
|
||||
RJP_value* read_restore_file(const char* file);
|
||||
|
||||
Reference in New Issue
Block a user