pv 955274 - Limit the random generated file size attribute to 1 TB (if size is too big the kernel panics)

Merge of master-melb:xfs-cmds:27060a by kenmcd.

  pv 955274 - Limit the random generated file size attribute to 1 TB (if size is too big the kernel panics)
This commit is contained in:
Vlad Apostolov
2006-09-27 06:07:10 +00:00
parent 4cf12f411a
commit 817207981e
+1 -1
View File
@@ -237,7 +237,7 @@ main(
stat_arr[i].dt_uid=(uid_t)(rand()+rand()*0x10000);
stat_arr[i].dt_gid=(gid_t)(rand()+rand()*0x10000);
stat_arr[i].dt_mode=(mode_t)((rand()%4096)+32768);
stat_arr[i].dt_size=(dm_off_t)(rand()+rand()*0x10000);
stat_arr[i].dt_size=((dm_off_t)(rand()+rand()*0x10000)) & 0x3FFFFFFFFFFFF; /* 1 TB max */
}
/*-----------------------------------------------------*\