diff options
Diffstat (limited to 'Documentation/accounting')
-rw-r--r-- | Documentation/accounting/getdelays.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index 6207e2f59e3b..71acc28ed0d1 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -61,8 +61,6 @@ __u64 stime, utime; | |||
61 | #define MAX_MSG_SIZE 1024 | 61 | #define MAX_MSG_SIZE 1024 |
62 | /* Maximum number of cpus expected to be specified in a cpumask */ | 62 | /* Maximum number of cpus expected to be specified in a cpumask */ |
63 | #define MAX_CPUS 32 | 63 | #define MAX_CPUS 32 |
64 | /* Maximum length of pathname to log file */ | ||
65 | #define MAX_FILENAME 256 | ||
66 | 64 | ||
67 | struct msgtemplate { | 65 | struct msgtemplate { |
68 | struct nlmsghdr n; | 66 | struct nlmsghdr n; |
@@ -231,7 +229,7 @@ int main(int argc, char *argv[]) | |||
231 | int count = 0; | 229 | int count = 0; |
232 | int write_file = 0; | 230 | int write_file = 0; |
233 | int maskset = 0; | 231 | int maskset = 0; |
234 | char logfile[128]; | 232 | char *logfile = NULL; |
235 | int loop = 0; | 233 | int loop = 0; |
236 | 234 | ||
237 | struct msgtemplate msg; | 235 | struct msgtemplate msg; |
@@ -251,7 +249,7 @@ int main(int argc, char *argv[]) | |||
251 | print_io_accounting = 1; | 249 | print_io_accounting = 1; |
252 | break; | 250 | break; |
253 | case 'w': | 251 | case 'w': |
254 | strncpy(logfile, optarg, MAX_FILENAME); | 252 | logfile = strdup(optarg); |
255 | printf("write to file %s\n", logfile); | 253 | printf("write to file %s\n", logfile); |
256 | write_file = 1; | 254 | write_file = 1; |
257 | break; | 255 | break; |