009-mtd_uaccess.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. Index: linux-2.4.35.4/drivers/mtd/mtdchar.c
  2. ===================================================================
  3. --- linux-2.4.35.4.orig/drivers/mtd/mtdchar.c
  4. +++ linux-2.4.35.4/drivers/mtd/mtdchar.c
  5. @@ -558,13 +558,13 @@ static void mtd_notify_add(struct mtd_in
  6. sprintf(name, "%d", mtd->index);
  7. devfs_rw_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
  8. DEVFS_FL_DEFAULT, MTD_CHAR_MAJOR, mtd->index*2,
  9. - S_IFCHR | S_IRUGO | S_IWUGO,
  10. + S_IFCHR | S_IRUSR | S_IWUSR,
  11. &mtd_fops, NULL);
  12. sprintf(name, "%dro", mtd->index);
  13. devfs_ro_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
  14. DEVFS_FL_DEFAULT, MTD_CHAR_MAJOR, mtd->index*2+1,
  15. - S_IFCHR | S_IRUGO,
  16. + S_IFCHR | S_IRUSR,
  17. &mtd_fops, NULL);
  18. }
  19. Index: linux-2.4.35.4/drivers/mtd/mtdblock.c
  20. ===================================================================
  21. --- linux-2.4.35.4.orig/drivers/mtd/mtdblock.c
  22. +++ linux-2.4.35.4/drivers/mtd/mtdblock.c
  23. @@ -601,7 +601,7 @@ static void mtd_notify_add(struct mtd_in
  24. sprintf(name, "%d", mtd->index);
  25. devfs_rw_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
  26. DEVFS_FL_DEFAULT, MTD_BLOCK_MAJOR, mtd->index,
  27. - S_IFBLK | S_IRUGO | S_IWUGO,
  28. + S_IFBLK | S_IRUSR | S_IWUSR,
  29. &mtd_fops, NULL);
  30. }