Merge branch 'master' of ssh://router/data/git/fio
[fio.git] / fio-ini.c
index 9f2f06eb26de77a8b90abc1bb79920aa125db527..9b9262c9d8e0274528ce991190b01b365d86e523 100644 (file)
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -50,6 +50,7 @@ int rate_quit = 0;
 int write_lat_log = 0;
 int write_bw_log = 0;
 int exitall_on_terminate = 0;
+unsigned long long mlock_size = 0;
 
 static int setup_rate(struct thread_data *td)
 {
@@ -486,6 +487,9 @@ static int check_int(char *p, char *name, unsigned int *val)
 {
        char *str;
 
+       if (strncmp(p, name, strlen(name)))
+               return 1;
+
        str = strstr(p, name);
        if (!str)
                return 1;
@@ -669,6 +673,7 @@ int parse_jobs_ini(char *file)
                                continue;
                        if (strstr(p, "["))
                                break;
+                       strip_blank_front(&p);
                        strip_blank_end(p);
 
                        if (!check_int(p, "prio", &prio)) {
@@ -803,6 +808,10 @@ int parse_jobs_ini(char *file)
                                fgetpos(f, &off);
                                continue;
                        }
+                       if (!check_strcnv(p, "lockmem", &mlock_size)) {
+                               fgetpos(f, &off);
+                               continue;
+                       }
                        if (!check_strstore(p, "directory", td->directory)) {
                                fgetpos(f, &off);
                                continue;