On Fri, 2008-11-21 at 17:25 +0530, [EMAIL PROTECTED] wrote:
> plain text document attachment
> (replace-magic-numbers-by-FILENAME_MAX-macro.patch)
> 32 bytes are really unsufficient for hoding dir names, changing it to
> FILENAME_MAX.
>
> Signed-off-by: Sudhir Kumar <[EMAIL PROTECTED]>
Thanks.
Regards--
Subrata
>
> Index: ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
> ===================================================================
> --- ltp-full-20081031.orig/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
> +++ ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
> @@ -86,7 +86,8 @@ int main(int argc, char* argv[])
> {
>
> int num_cpus, test_num, len; /* Total time = TIME_INTERVAL *num_cpus
> in the machine */
> - char mygroup[32], mytaskfile[32], mysharesfile[32], ch;
> + char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
> + char mysharesfile[FILENAME_MAX], ch;
> pid_t pid;
> int my_group_num, /* A number attached with a group*/
> fd, /* A descriptor to open a fifo for
> synchronized start*/
> Index: ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test02.c
> ===================================================================
> --- ltp-full-20081031.orig/testcases/kernel/controllers/cpuctl/cpuctl_test02.c
> +++ ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test02.c
> @@ -87,7 +87,8 @@ int main(int argc, char* argv[])
>
> int test_num, task_num, len, num_cpus; /* Total time = TIME_INTERVAL
> *num_cpus in the machine */
> int migrate=0; /* For task migration*/
> - char mygroup[32], mytaskfile[32], mysharesfile[32], ch;
> + char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
> + char mysharesfile[FILENAME_MAX], ch;
> /* Following variables are to capture parameters from script*/
> char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p,
> *task_num_p;
> pid_t pid;
> Index: ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test03.c
> ===================================================================
> --- ltp-full-20081031.orig/testcases/kernel/controllers/cpuctl/cpuctl_test03.c
> +++ ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test03.c
> @@ -85,7 +85,8 @@ int main(int argc, char* argv[])
> {
>
> int test_num, task_num, len, num_cpus; /* Total time = TIME_INTERVAL
> *num_cpus in the machine */
> - char mygroup[32], mytaskfile[32], mysharesfile[32], ch;
> + char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
> + char mysharesfile[FILENAME_MAX], ch;
> /* Following variables are to capture parameters from script*/
> char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p,
> *task_num_p;
> pid_t pid;
> Index: ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test04.c
> ===================================================================
> --- ltp-full-20081031.orig/testcases/kernel/controllers/cpuctl/cpuctl_test04.c
> +++ ltp-full-20081031/testcases/kernel/controllers/cpuctl/cpuctl_test04.c
> @@ -85,7 +85,8 @@ int main(int argc, char* argv[])
> {
>
> int test_num, task_num, len, num_cpus; /* Total time = TIME_INTERVAL
> *num_cpus in the machine */
> - char mygroup[64], mytaskfile[64], mysharesfile[64], ch;
> + char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
> + char mysharesfile[FILENAME_MAX], ch;
> /* Following variables are to capture parameters from script*/
> char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p,
> *task_num_p;
> int mygroup_num, /* A number attached with a group*/
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list