projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dea2f89
)
Fix infinite loop when parsing numeric trace flags written to /proc/yaffs.
author
imcd
<imcd>
Thu, 16 Aug 2007 20:42:11 +0000
(20:42 +0000)
committer
imcd
<imcd>
Thu, 16 Aug 2007 20:42:11 +0000
(20:42 +0000)
yaffs_fs.c
patch
|
blob
|
history
diff --git
a/yaffs_fs.c
b/yaffs_fs.c
index 6e5aa70301f1c43948ce94f10aadb90ac6b0ca6d..b83794f5d69e54c959d7bf54f1796c41d9734da4 100644
(file)
--- a/
yaffs_fs.c
+++ b/
yaffs_fs.c
@@
-32,7
+32,7
@@
*/
const char *yaffs_fs_c_version =
*/
const char *yaffs_fs_c_version =
- "$Id: yaffs_fs.c,v 1.6
1 2007-07-18 19:40:38 charles
Exp $";
+ "$Id: yaffs_fs.c,v 1.6
2 2007-08-16 20:42:11 imcd
Exp $";
extern const char *yaffs_guts_c_version;
#include <linux/version.h>
extern const char *yaffs_guts_c_version;
#include <linux/version.h>
@@
-2128,6
+2128,7
@@
static int yaffs_proc_write(struct file *file, const char *buf,
if (end > buf + pos) {
mask_name = "numeral";
len = end - (buf + pos);
if (end > buf + pos) {
mask_name = "numeral";
len = end - (buf + pos);
+ pos += len;
done = 0;
} else {
for(x = buf + pos, i = 0;
done = 0;
} else {
for(x = buf + pos, i = 0;
@@
-2137,8
+2138,6
@@
static int yaffs_proc_write(struct file *file, const char *buf,
substring[i] = '\0';
for (i = 0; mask_flags[i].mask_name != NULL; i++) {
substring[i] = '\0';
for (i = 0; mask_flags[i].mask_name != NULL; i++) {
- //len = strlen(mask_flags[i].mask_name);
- //if (strncmp(buf + pos, mask_flags[i].mask_name, len) == 0) {
if(strcmp(substring,mask_flags[i].mask_name) == 0){
mask_name = mask_flags[i].mask_name;
mask_bitfield = mask_flags[i].mask_bitfield;
if(strcmp(substring,mask_flags[i].mask_name) == 0){
mask_name = mask_flags[i].mask_name;
mask_bitfield = mask_flags[i].mask_bitfield;
@@
-2149,7
+2148,6
@@
static int yaffs_proc_write(struct file *file, const char *buf,
}
if (mask_name != NULL) {
}
if (mask_name != NULL) {
- // pos += len;
done = 0;
switch(add) {
case '-':
done = 0;
switch(add) {
case '-':