[Concept,12/21] isofs: Replace Linux includes in source files
Commit Message
From: Simon Glass <sjg@chromium.org>
The Linux kernel isofs source files include kernel-specific headers
(<linux/gfp.h>, <linux/slab.h>, <linux/cdrom.h>, etc.) that are not
available in U-Boot. Replace these with the single internal isofs.h
header, which pulls in the U-Boot compatibility layer.
The only modification to each file is replacing the Linux includes
with #include "isofs.h" and adding a "Ported to U-Boot" comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
fs/isofs/dir.c | 4 ++--
fs/isofs/inode.c | 18 ++----------------
fs/isofs/joliet.c | 4 ++--
fs/isofs/namei.c | 3 ++-
fs/isofs/rock.c | 5 ++---
fs/isofs/util.c | 3 +--
6 files changed, 11 insertions(+), 26 deletions(-)
@@ -10,9 +10,9 @@
* (stephen@askone.demon.co.uk) : 21st June 1996
*
* isofs directory handling functions
+ *
+ * Ported to U-Boot with minimal modifications.
*/
-#include <linux/gfp.h>
-#include <linux/filelock.h>
#include "isofs.h"
int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode)
@@ -10,24 +10,10 @@
* 1998 Eric Lammerts - ISO 9660 Level 3
* 2004 Paul Serice - Inode Support pushed out from 4GB to 128GB
* 2004 Paul Serice - NFS Export Operations
+ *
+ * Ported to U-Boot with minimal modifications.
*/
-#include <linux/init.h>
-#include <linux/module.h>
-
-#include <linux/slab.h>
-#include <linux/cred.h>
-#include <linux/nls.h>
-#include <linux/ctype.h>
-#include <linux/statfs.h>
-#include <linux/cdrom.h>
-#include <linux/mpage.h>
-#include <linux/user_namespace.h>
-#include <linux/seq_file.h>
-#include <linux/blkdev.h>
-#include <linux/fs_context.h>
-#include <linux/fs_parser.h>
-
#include "isofs.h"
#include "zisofs.h"
@@ -5,10 +5,10 @@
* (C) 1996 Gordon Chaffee
*
* Joliet: Microsoft's Unicode extensions to iso9660
+ *
+ * Ported to U-Boot with minimal modifications.
*/
-#include <linux/types.h>
-#include <linux/nls.h>
#include "isofs.h"
/*
@@ -5,9 +5,10 @@
* (C) 1992 Eric Youngdale Modified for ISO 9660 filesystem.
*
* (C) 1991 Linus Torvalds - minix filesystem
+ *
+ * Ported to U-Boot with minimal modifications.
*/
-#include <linux/gfp.h>
#include "isofs.h"
/*
@@ -5,11 +5,10 @@
* (C) 1992, 1993 Eric Youngdale
*
* Rock Ridge Extensions to iso9660
+ *
+ * Ported to U-Boot with minimal modifications.
*/
-#include <linux/slab.h>
-#include <linux/pagemap.h>
-
#include "isofs.h"
#include "rock.h"
@@ -3,7 +3,6 @@
* linux/fs/isofs/util.c
*/
-#include <linux/time.h>
#include "isofs.h"
/*
@@ -52,7 +51,7 @@ struct timespec64 iso_date(u8 *p, int flags)
/* sign extend */
if (tz & 0x80)
- tz |= (-1 << 8);
+ tz |= ~0U << 8;
/*
* The timezone offset is unreliable on some disks,