Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c3d7ae3b
Commit
c3d7ae3b
authored
Mar 17, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
5bb3575c
27033215
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
208 additions
and
191 deletions
+208
-191
arch/ppc/kernel/align.c
arch/ppc/kernel/align.c
+1
-1
arch/ppc/kernel/prom_init.c
arch/ppc/kernel/prom_init.c
+8
-8
arch/ppc/platforms/pmac_feature.c
arch/ppc/platforms/pmac_feature.c
+7
-3
drivers/pci/pci.c
drivers/pci/pci.c
+17
-38
fs/isofs/dir.c
fs/isofs/dir.c
+8
-9
fs/isofs/inode.c
fs/isofs/inode.c
+84
-73
fs/isofs/joliet.c
fs/isofs/joliet.c
+2
-2
fs/isofs/namei.c
fs/isofs/namei.c
+7
-6
fs/isofs/rock.c
fs/isofs/rock.c
+13
-13
fs/udf/super.c
fs/udf/super.c
+9
-0
fs/udf/udf_sb.h
fs/udf/udf_sb.h
+5
-1
fs/udf/udfdecl.h
fs/udf/udfdecl.h
+2
-2
include/asm-ppc/siginfo.h
include/asm-ppc/siginfo.h
+1
-1
include/asm-ppc/thread_info.h
include/asm-ppc/thread_info.h
+5
-4
include/linux/fs.h
include/linux/fs.h
+0
-4
include/linux/if_wanpipe.h
include/linux/if_wanpipe.h
+1
-0
include/linux/iso_fs.h
include/linux/iso_fs.h
+6
-1
net/ipv4/netfilter/ip_conntrack_standalone.c
net/ipv4/netfilter/ip_conntrack_standalone.c
+1
-1
net/wanrouter/af_wanpipe.c
net/wanrouter/af_wanpipe.c
+31
-24
No files found.
arch/ppc/kernel/align.c
View file @
c3d7ae3b
...
@@ -28,7 +28,7 @@ struct aligninfo {
...
@@ -28,7 +28,7 @@ struct aligninfo {
#define OPCD(inst) (((inst) & 0xFC000000) >> 26)
#define OPCD(inst) (((inst) & 0xFC000000) >> 26)
#define RS(inst) (((inst) & 0x03E00000) >> 21)
#define RS(inst) (((inst) & 0x03E00000) >> 21)
#define RA(inst) (((inst) & 0x001F0000) >> 16)
#define RA(inst) (((inst) & 0x001F0000) >> 16)
#define IS_DFORM(code) ((code) >= 32 && (code) <=
47
)
#define IS_DFORM(code) ((code) >= 32 && (code) <=
55
)
#endif
#endif
#define INVALID { 0, 0 }
#define INVALID { 0, 0 }
...
...
arch/ppc/kernel/prom_init.c
View file @
c3d7ae3b
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
#define FB_MAX 8
#define FB_MAX 8
#endif
#endif
#define ALIGN(x) (((x) + sizeof(unsigned long)-1) & -sizeof(unsigned long))
#define ALIGN
UL
(x) (((x) + sizeof(unsigned long)-1) & -sizeof(unsigned long))
struct
prom_args
{
struct
prom_args
{
const
char
*
service
;
const
char
*
service
;
...
@@ -376,7 +376,7 @@ check_display(unsigned long mem)
...
@@ -376,7 +376,7 @@ check_display(unsigned long mem)
}
}
}
}
return
ALIGN
(
mem
);
return
ALIGN
UL
(
mem
);
}
}
/* This function will enable the early boot text when doing OF booting. This
/* This function will enable the early boot text when doing OF booting. This
...
@@ -457,7 +457,7 @@ copy_device_tree(unsigned long mem_start, unsigned long mem_end)
...
@@ -457,7 +457,7 @@ copy_device_tree(unsigned long mem_start, unsigned long mem_end)
prom_exit
();
prom_exit
();
}
}
allnextp
=
&
allnodes
;
allnextp
=
&
allnodes
;
mem_start
=
ALIGN
(
mem_start
);
mem_start
=
ALIGN
UL
(
mem_start
);
new_start
=
inspect_node
(
root
,
0
,
mem_start
,
mem_end
,
&
allnextp
);
new_start
=
inspect_node
(
root
,
0
,
mem_start
,
mem_end
,
&
allnextp
);
*
allnextp
=
0
;
*
allnextp
=
0
;
return
new_start
;
return
new_start
;
...
@@ -501,7 +501,7 @@ inspect_node(phandle node, struct device_node *dad,
...
@@ -501,7 +501,7 @@ inspect_node(phandle node, struct device_node *dad,
if
((
int
)
call_prom
(
"nextprop"
,
3
,
1
,
node
,
prev_name
,
if
((
int
)
call_prom
(
"nextprop"
,
3
,
1
,
node
,
prev_name
,
namep
)
<=
0
)
namep
)
<=
0
)
break
;
break
;
mem_start
=
ALIGN
((
unsigned
long
)
namep
+
strlen
(
namep
)
+
1
);
mem_start
=
ALIGN
UL
((
unsigned
long
)
namep
+
strlen
(
namep
)
+
1
);
prev_name
=
namep
;
prev_name
=
namep
;
valp
=
(
unsigned
char
*
)
mem_start
;
valp
=
(
unsigned
char
*
)
mem_start
;
pp
->
value
=
PTRUNRELOC
(
valp
);
pp
->
value
=
PTRUNRELOC
(
valp
);
...
@@ -514,7 +514,7 @@ inspect_node(phandle node, struct device_node *dad,
...
@@ -514,7 +514,7 @@ inspect_node(phandle node, struct device_node *dad,
if
(
pp
->
length
>
MAX_PROPERTY_LENGTH
)
if
(
pp
->
length
>
MAX_PROPERTY_LENGTH
)
continue
;
/* ignore this property */
continue
;
/* ignore this property */
#endif
#endif
mem_start
=
ALIGN
(
mem_start
+
pp
->
length
);
mem_start
=
ALIGN
UL
(
mem_start
+
pp
->
length
);
*
prev_propp
=
PTRUNRELOC
(
pp
);
*
prev_propp
=
PTRUNRELOC
(
pp
);
prev_propp
=
&
pp
->
next
;
prev_propp
=
&
pp
->
next
;
}
}
...
@@ -526,7 +526,7 @@ inspect_node(phandle node, struct device_node *dad,
...
@@ -526,7 +526,7 @@ inspect_node(phandle node, struct device_node *dad,
namep
=
(
char
*
)
(
pp
+
1
);
namep
=
(
char
*
)
(
pp
+
1
);
pp
->
name
=
PTRUNRELOC
(
namep
);
pp
->
name
=
PTRUNRELOC
(
namep
);
strcpy
(
namep
,
"linux,phandle"
);
strcpy
(
namep
,
"linux,phandle"
);
mem_start
=
ALIGN
((
unsigned
long
)
namep
+
strlen
(
namep
)
+
1
);
mem_start
=
ALIGN
UL
((
unsigned
long
)
namep
+
strlen
(
namep
)
+
1
);
pp
->
value
=
(
unsigned
char
*
)
PTRUNRELOC
(
&
np
->
node
);
pp
->
value
=
(
unsigned
char
*
)
PTRUNRELOC
(
&
np
->
node
);
pp
->
length
=
sizeof
(
np
->
node
);
pp
->
length
=
sizeof
(
np
->
node
);
}
}
...
@@ -538,7 +538,7 @@ inspect_node(phandle node, struct device_node *dad,
...
@@ -538,7 +538,7 @@ inspect_node(phandle node, struct device_node *dad,
if
(
l
>=
0
)
{
if
(
l
>=
0
)
{
np
->
full_name
=
PTRUNRELOC
((
char
*
)
mem_start
);
np
->
full_name
=
PTRUNRELOC
((
char
*
)
mem_start
);
*
(
char
*
)(
mem_start
+
l
)
=
0
;
*
(
char
*
)(
mem_start
+
l
)
=
0
;
mem_start
=
ALIGN
(
mem_start
+
l
+
1
);
mem_start
=
ALIGN
UL
(
mem_start
+
l
+
1
);
}
}
/* do all our children */
/* do all our children */
...
@@ -741,7 +741,7 @@ prom_init(int r3, int r4, prom_entry pp)
...
@@ -741,7 +741,7 @@ prom_init(int r3, int r4, prom_entry pp)
*
d
=
0
;
*
d
=
0
;
call_prom
(
"canon"
,
3
,
1
,
p
,
d
,
1
<<
20
);
call_prom
(
"canon"
,
3
,
1
,
p
,
d
,
1
<<
20
);
bootdevice
=
PTRUNRELOC
(
d
);
bootdevice
=
PTRUNRELOC
(
d
);
mem
=
ALIGN
(
mem
+
strlen
(
d
)
+
1
);
mem
=
ALIGN
UL
(
mem
+
strlen
(
d
)
+
1
);
}
}
prom_instantiate_rtas
();
prom_instantiate_rtas
();
...
...
arch/ppc/platforms/pmac_feature.c
View file @
c3d7ae3b
...
@@ -400,13 +400,17 @@ heathrow_modem_enable(struct device_node* node, int param, int value)
...
@@ -400,13 +400,17 @@ heathrow_modem_enable(struct device_node* node, int param, int value)
LOCK
(
flags
);
LOCK
(
flags
);
MACIO_OUT8
(
HRW_GPIO_MODEM_RESET
,
gpio
|
1
);
MACIO_OUT8
(
HRW_GPIO_MODEM_RESET
,
gpio
|
1
);
(
void
)
MACIO_IN8
(
HRW_GPIO_MODEM_RESET
);
(
void
)
MACIO_IN8
(
HRW_GPIO_MODEM_RESET
);
UNLOCK
(
flags
);
mdelay
(
250
);
LOCK
(
flags
);
UNLOCK
(
flags
);
mdelay
(
250
);
LOCK
(
flags
);
MACIO_OUT8
(
HRW_GPIO_MODEM_RESET
,
gpio
);
MACIO_OUT8
(
HRW_GPIO_MODEM_RESET
,
gpio
);
(
void
)
MACIO_IN8
(
HRW_GPIO_MODEM_RESET
);
(
void
)
MACIO_IN8
(
HRW_GPIO_MODEM_RESET
);
UNLOCK
(
flags
);
mdelay
(
250
);
LOCK
(
flags
);
UNLOCK
(
flags
);
mdelay
(
250
);
LOCK
(
flags
);
MACIO_OUT8
(
HRW_GPIO_MODEM_RESET
,
gpio
|
1
);
MACIO_OUT8
(
HRW_GPIO_MODEM_RESET
,
gpio
|
1
);
(
void
)
MACIO_IN8
(
HRW_GPIO_MODEM_RESET
);
(
void
)
MACIO_IN8
(
HRW_GPIO_MODEM_RESET
);
UNLOCK
(
flags
);
mdelay
(
250
);
LOCK
(
flags
);
UNLOCK
(
flags
);
}
}
return
0
;
return
0
;
}
}
...
...
drivers/pci/pci.c
View file @
c3d7ae3b
...
@@ -1710,7 +1710,6 @@ struct pci_pool { /* the pool */
...
@@ -1710,7 +1710,6 @@ struct pci_pool { /* the pool */
spinlock_t
lock
;
spinlock_t
lock
;
size_t
blocks_per_page
;
size_t
blocks_per_page
;
size_t
size
;
size_t
size
;
int
flags
;
struct
pci_dev
*
dev
;
struct
pci_dev
*
dev
;
size_t
allocation
;
size_t
allocation
;
char
name
[
32
];
char
name
[
32
];
...
@@ -1727,8 +1726,6 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
...
@@ -1727,8 +1726,6 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
#define POOL_TIMEOUT_JIFFIES ((100
/* msec */
* HZ) / 1000)
#define POOL_TIMEOUT_JIFFIES ((100
/* msec */
* HZ) / 1000)
#define POOL_POISON_BYTE 0xa7
#define POOL_POISON_BYTE 0xa7
// #define CONFIG_PCIPOOL_DEBUG
/**
/**
* pci_pool_create - Creates a pool of pci consistent memory blocks, for dma.
* pci_pool_create - Creates a pool of pci consistent memory blocks, for dma.
...
@@ -1737,7 +1734,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
...
@@ -1737,7 +1734,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
* @size: size of the blocks in this pool.
* @size: size of the blocks in this pool.
* @align: alignment requirement for blocks; must be a power of two
* @align: alignment requirement for blocks; must be a power of two
* @allocation: returned blocks won't cross this boundary (or zero)
* @allocation: returned blocks won't cross this boundary (or zero)
* @
flags: SLAB_* flags (not all are supported)
.
* @
mem_flags: SLAB_* flags
.
*
*
* Returns a pci allocation pool with the requested characteristics, or
* Returns a pci allocation pool with the requested characteristics, or
* null if one can't be created. Given one of these pools, pci_pool_alloc()
* null if one can't be created. Given one of these pools, pci_pool_alloc()
...
@@ -1753,7 +1750,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
...
@@ -1753,7 +1750,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
*/
*/
struct
pci_pool
*
struct
pci_pool
*
pci_pool_create
(
const
char
*
name
,
struct
pci_dev
*
pdev
,
pci_pool_create
(
const
char
*
name
,
struct
pci_dev
*
pdev
,
size_t
size
,
size_t
align
,
size_t
allocation
,
int
flags
)
size_t
size
,
size_t
align
,
size_t
allocation
,
int
mem_
flags
)
{
{
struct
pci_pool
*
retval
;
struct
pci_pool
*
retval
;
...
@@ -1777,13 +1774,9 @@ pci_pool_create (const char *name, struct pci_dev *pdev,
...
@@ -1777,13 +1774,9 @@ pci_pool_create (const char *name, struct pci_dev *pdev,
}
else
if
(
allocation
<
size
)
}
else
if
(
allocation
<
size
)
return
0
;
return
0
;
if
(
!
(
retval
=
kmalloc
(
sizeof
*
retval
,
flags
)))
if
(
!
(
retval
=
kmalloc
(
sizeof
*
retval
,
mem_
flags
)))
return
retval
;
return
retval
;
#ifdef CONFIG_PCIPOOL_DEBUG
flags
|=
SLAB_POISON
;
#endif
strncpy
(
retval
->
name
,
name
,
sizeof
retval
->
name
);
strncpy
(
retval
->
name
,
name
,
sizeof
retval
->
name
);
retval
->
name
[
sizeof
retval
->
name
-
1
]
=
0
;
retval
->
name
[
sizeof
retval
->
name
-
1
]
=
0
;
...
@@ -1791,17 +1784,10 @@ pci_pool_create (const char *name, struct pci_dev *pdev,
...
@@ -1791,17 +1784,10 @@ pci_pool_create (const char *name, struct pci_dev *pdev,
INIT_LIST_HEAD
(
&
retval
->
page_list
);
INIT_LIST_HEAD
(
&
retval
->
page_list
);
spin_lock_init
(
&
retval
->
lock
);
spin_lock_init
(
&
retval
->
lock
);
retval
->
size
=
size
;
retval
->
size
=
size
;
retval
->
flags
=
flags
;
retval
->
allocation
=
allocation
;
retval
->
allocation
=
allocation
;
retval
->
blocks_per_page
=
allocation
/
size
;
retval
->
blocks_per_page
=
allocation
/
size
;
init_waitqueue_head
(
&
retval
->
waitq
);
init_waitqueue_head
(
&
retval
->
waitq
);
#ifdef CONFIG_PCIPOOL_DEBUG
printk
(
KERN_DEBUG
"pcipool create %s/%s size %d, %d/page (%d alloc)
\n
"
,
pdev
?
pdev
->
slot_name
:
NULL
,
retval
->
name
,
size
,
retval
->
blocks_per_page
,
allocation
);
#endif
return
retval
;
return
retval
;
}
}
...
@@ -1824,8 +1810,9 @@ pool_alloc_page (struct pci_pool *pool, int mem_flags)
...
@@ -1824,8 +1810,9 @@ pool_alloc_page (struct pci_pool *pool, int mem_flags)
&
page
->
dma
);
&
page
->
dma
);
if
(
page
->
vaddr
)
{
if
(
page
->
vaddr
)
{
memset
(
page
->
bitmap
,
0xff
,
mapsize
);
// bit set == free
memset
(
page
->
bitmap
,
0xff
,
mapsize
);
// bit set == free
if
(
pool
->
flags
&
SLAB_POISON
)
#ifdef CONFIG_DEBUG_SLAB
memset
(
page
->
vaddr
,
POOL_POISON_BYTE
,
pool
->
allocation
);
memset
(
page
->
vaddr
,
POOL_POISON_BYTE
,
pool
->
allocation
);
#endif
list_add
(
&
page
->
page_list
,
&
pool
->
page_list
);
list_add
(
&
page
->
page_list
,
&
pool
->
page_list
);
}
else
{
}
else
{
kfree
(
page
);
kfree
(
page
);
...
@@ -1851,8 +1838,9 @@ pool_free_page (struct pci_pool *pool, struct pci_page *page)
...
@@ -1851,8 +1838,9 @@ pool_free_page (struct pci_pool *pool, struct pci_page *page)
{
{
dma_addr_t
dma
=
page
->
dma
;
dma_addr_t
dma
=
page
->
dma
;
if
(
pool
->
flags
&
SLAB_POISON
)
#ifdef CONFIG_DEBUG_SLAB
memset
(
page
->
vaddr
,
POOL_POISON_BYTE
,
pool
->
allocation
);
memset
(
page
->
vaddr
,
POOL_POISON_BYTE
,
pool
->
allocation
);
#endif
pci_free_consistent
(
pool
->
dev
,
pool
->
allocation
,
page
->
vaddr
,
dma
);
pci_free_consistent
(
pool
->
dev
,
pool
->
allocation
,
page
->
vaddr
,
dma
);
list_del
(
&
page
->
page_list
);
list_del
(
&
page
->
page_list
);
kfree
(
page
);
kfree
(
page
);
...
@@ -1871,12 +1859,6 @@ pci_pool_destroy (struct pci_pool *pool)
...
@@ -1871,12 +1859,6 @@ pci_pool_destroy (struct pci_pool *pool)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
#ifdef CONFIG_PCIPOOL_DEBUG
printk
(
KERN_DEBUG
"pcipool destroy %s/%s
\n
"
,
pool
->
dev
?
pool
->
dev
->
slot_name
:
NULL
,
pool
->
name
);
#endif
spin_lock_irqsave
(
&
pool
->
lock
,
flags
);
spin_lock_irqsave
(
&
pool
->
lock
,
flags
);
while
(
!
list_empty
(
&
pool
->
page_list
))
{
while
(
!
list_empty
(
&
pool
->
page_list
))
{
struct
pci_page
*
page
;
struct
pci_page
*
page
;
...
@@ -2010,30 +1992,27 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma)
...
@@ -2010,30 +1992,27 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma)
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
return
;
return
;
}
}
#ifdef CONFIG_PCIPOOL_DEBUG
if
(((
dma
-
page
->
dma
)
+
(
void
*
)
page
->
vaddr
)
!=
vaddr
)
{
printk
(
KERN_ERR
"pci_pool_free %s/%s, %p (bad vaddr)/%lx
\n
"
,
pool
->
dev
?
pool
->
dev
->
slot_name
:
NULL
,
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
return
;
}
#endif
block
=
dma
-
page
->
dma
;
block
=
dma
-
page
->
dma
;
block
/=
pool
->
size
;
block
/=
pool
->
size
;
map
=
block
/
BITS_PER_LONG
;
map
=
block
/
BITS_PER_LONG
;
block
%=
BITS_PER_LONG
;
block
%=
BITS_PER_LONG
;
#ifdef CONFIG_PCIPOOL_DEBUG
#ifdef CONFIG_DEBUG_SLAB
if
(((
dma
-
page
->
dma
)
+
(
void
*
)
page
->
vaddr
)
!=
vaddr
)
{
printk
(
KERN_ERR
"pci_pool_free %s/%s, %p (bad vaddr)/%lx
\n
"
,
pool
->
dev
?
pool
->
dev
->
slot_name
:
NULL
,
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
return
;
}
if
(
page
->
bitmap
[
map
]
&
(
1UL
<<
block
))
{
if
(
page
->
bitmap
[
map
]
&
(
1UL
<<
block
))
{
printk
(
KERN_ERR
"pci_pool_free %s/%s, dma %x already free
\n
"
,
printk
(
KERN_ERR
"pci_pool_free %s/%s, dma %x already free
\n
"
,
pool
->
dev
?
pool
->
dev
->
slot_name
:
NULL
,
pool
->
dev
?
pool
->
dev
->
slot_name
:
NULL
,
pool
->
name
,
dma
);
pool
->
name
,
dma
);
return
;
return
;
}
}
#endif
if
(
pool
->
flags
&
SLAB_POISON
)
memset
(
vaddr
,
POOL_POISON_BYTE
,
pool
->
size
);
memset
(
vaddr
,
POOL_POISON_BYTE
,
pool
->
size
);
#endif
spin_lock_irqsave
(
&
pool
->
lock
,
flags
);
spin_lock_irqsave
(
&
pool
->
lock
,
flags
);
set_bit
(
block
,
&
page
->
bitmap
[
map
]);
set_bit
(
block
,
&
page
->
bitmap
[
map
]);
...
...
fs/isofs/dir.c
View file @
c3d7ae3b
...
@@ -110,14 +110,13 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
...
@@ -110,14 +110,13 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
struct
buffer_head
*
bh
=
NULL
;
struct
buffer_head
*
bh
=
NULL
;
int
len
;
int
len
;
int
map
;
int
map
;
int
high_sierra
;
int
first_de
=
1
;
int
first_de
=
1
;
char
*
p
=
NULL
;
/* Quiet GCC */
char
*
p
=
NULL
;
/* Quiet GCC */
struct
iso_directory_record
*
de
;
struct
iso_directory_record
*
de
;
struct
isofs_sb_info
*
sbi
=
ISOFS_SB
(
inode
->
i_sb
);
offset
=
filp
->
f_pos
&
(
bufsize
-
1
);
offset
=
filp
->
f_pos
&
(
bufsize
-
1
);
block
=
filp
->
f_pos
>>
bufbits
;
block
=
filp
->
f_pos
>>
bufbits
;
high_sierra
=
inode
->
i_sb
->
u
.
isofs_sb
.
s_high_sierra
;
while
(
filp
->
f_pos
<
inode
->
i_size
)
{
while
(
filp
->
f_pos
<
inode
->
i_size
)
{
int
de_len
;
int
de_len
;
...
@@ -166,7 +165,7 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
...
@@ -166,7 +165,7 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
de
=
tmpde
;
de
=
tmpde
;
}
}
if
(
de
->
flags
[
-
high_sierra
]
&
0x80
)
{
if
(
de
->
flags
[
-
sbi
->
s_
high_sierra
]
&
0x80
)
{
first_de
=
0
;
first_de
=
0
;
filp
->
f_pos
+=
de_len
;
filp
->
f_pos
+=
de_len
;
continue
;
continue
;
...
@@ -194,16 +193,16 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
...
@@ -194,16 +193,16 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
/* Handle everything else. Do name translation if there
/* Handle everything else. Do name translation if there
is no Rock Ridge NM field. */
is no Rock Ridge NM field. */
if
(
inode
->
i_sb
->
u
.
isofs_sb
.
s_unhide
==
'n'
)
{
if
(
sbi
->
s_unhide
==
'n'
)
{
/* Do not report hidden or associated files */
/* Do not report hidden or associated files */
if
(
de
->
flags
[
-
high_sierra
]
&
5
)
{
if
(
de
->
flags
[
-
sbi
->
s_
high_sierra
]
&
5
)
{
filp
->
f_pos
+=
de_len
;
filp
->
f_pos
+=
de_len
;
continue
;
continue
;
}
}
}
}
map
=
1
;
map
=
1
;
if
(
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock
)
{
if
(
sbi
->
s_rock
)
{
len
=
get_rock_ridge_filename
(
de
,
tmpname
,
inode
);
len
=
get_rock_ridge_filename
(
de
,
tmpname
,
inode
);
if
(
len
!=
0
)
{
/* may be -1 */
if
(
len
!=
0
)
{
/* may be -1 */
p
=
tmpname
;
p
=
tmpname
;
...
@@ -212,16 +211,16 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
...
@@ -212,16 +211,16 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
}
}
if
(
map
)
{
if
(
map
)
{
#ifdef CONFIG_JOLIET
#ifdef CONFIG_JOLIET
if
(
inode
->
i_sb
->
u
.
isofs_sb
.
s_joliet_level
)
{
if
(
sbi
->
s_joliet_level
)
{
len
=
get_joliet_filename
(
de
,
tmpname
,
inode
);
len
=
get_joliet_filename
(
de
,
tmpname
,
inode
);
p
=
tmpname
;
p
=
tmpname
;
}
else
}
else
#endif
#endif
if
(
inode
->
i_sb
->
u
.
isofs_sb
.
s_mapping
==
'a'
)
{
if
(
sbi
->
s_mapping
==
'a'
)
{
len
=
get_acorn_filename
(
de
,
tmpname
,
inode
);
len
=
get_acorn_filename
(
de
,
tmpname
,
inode
);
p
=
tmpname
;
p
=
tmpname
;
}
else
}
else
if
(
inode
->
i_sb
->
u
.
isofs_sb
.
s_mapping
==
'n'
)
{
if
(
sbi
->
s_mapping
==
'n'
)
{
len
=
isofs_name_translate
(
de
,
tmpname
,
inode
);
len
=
isofs_name_translate
(
de
,
tmpname
,
inode
);
p
=
tmpname
;
p
=
tmpname
;
}
else
{
}
else
{
...
...
fs/isofs/inode.c
View file @
c3d7ae3b
This diff is collapsed.
Click to expand it.
fs/isofs/joliet.c
View file @
c3d7ae3b
...
@@ -77,8 +77,8 @@ get_joliet_filename(struct iso_directory_record * de, unsigned char *outname, st
...
@@ -77,8 +77,8 @@ get_joliet_filename(struct iso_directory_record * de, unsigned char *outname, st
struct
nls_table
*
nls
;
struct
nls_table
*
nls
;
unsigned
char
len
=
0
;
unsigned
char
len
=
0
;
utf8
=
inode
->
i_sb
->
u
.
isofs_sb
.
s_utf8
;
utf8
=
ISOFS_SB
(
inode
->
i_sb
)
->
s_utf8
;
nls
=
inode
->
i_sb
->
u
.
isofs_sb
.
s_nls_iocharset
;
nls
=
ISOFS_SB
(
inode
->
i_sb
)
->
s_nls_iocharset
;
if
(
utf8
)
{
if
(
utf8
)
{
len
=
wcsntombs_be
(
outname
,
de
->
name
,
len
=
wcsntombs_be
(
outname
,
de
->
name
,
...
...
fs/isofs/namei.c
View file @
c3d7ae3b
...
@@ -65,6 +65,7 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
...
@@ -65,6 +65,7 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
unsigned
char
bufbits
=
ISOFS_BUFFER_BITS
(
dir
);
unsigned
char
bufbits
=
ISOFS_BUFFER_BITS
(
dir
);
unsigned
int
block
,
f_pos
,
offset
;
unsigned
int
block
,
f_pos
,
offset
;
struct
buffer_head
*
bh
=
NULL
;
struct
buffer_head
*
bh
=
NULL
;
struct
isofs_sb_info
*
sbi
=
ISOFS_SB
(
dir
->
i_sb
);
if
(
!
ISOFS_I
(
dir
)
->
i_first_extent
)
if
(
!
ISOFS_I
(
dir
)
->
i_first_extent
)
return
0
;
return
0
;
...
@@ -120,19 +121,19 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
...
@@ -120,19 +121,19 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
dlen
=
de
->
name_len
[
0
];
dlen
=
de
->
name_len
[
0
];
dpnt
=
de
->
name
;
dpnt
=
de
->
name
;
if
(
dir
->
i_sb
->
u
.
isofs_sb
.
s_rock
&&
if
(
sbi
->
s_rock
&&
((
i
=
get_rock_ridge_filename
(
de
,
tmpname
,
dir
))))
{
((
i
=
get_rock_ridge_filename
(
de
,
tmpname
,
dir
))))
{
dlen
=
i
;
/* possibly -1 */
dlen
=
i
;
/* possibly -1 */
dpnt
=
tmpname
;
dpnt
=
tmpname
;
#ifdef CONFIG_JOLIET
#ifdef CONFIG_JOLIET
}
else
if
(
dir
->
i_sb
->
u
.
isofs_sb
.
s_joliet_level
)
{
}
else
if
(
sbi
->
s_joliet_level
)
{
dlen
=
get_joliet_filename
(
de
,
tmpname
,
dir
);
dlen
=
get_joliet_filename
(
de
,
tmpname
,
dir
);
dpnt
=
tmpname
;
dpnt
=
tmpname
;
#endif
#endif
}
else
if
(
dir
->
i_sb
->
u
.
isofs_sb
.
s_mapping
==
'a'
)
{
}
else
if
(
sbi
->
s_mapping
==
'a'
)
{
dlen
=
get_acorn_filename
(
de
,
tmpname
,
dir
);
dlen
=
get_acorn_filename
(
de
,
tmpname
,
dir
);
dpnt
=
tmpname
;
dpnt
=
tmpname
;
}
else
if
(
dir
->
i_sb
->
u
.
isofs_sb
.
s_mapping
==
'n'
)
{
}
else
if
(
sbi
->
s_mapping
==
'n'
)
{
dlen
=
isofs_name_translate
(
de
,
tmpname
,
dir
);
dlen
=
isofs_name_translate
(
de
,
tmpname
,
dir
);
dpnt
=
tmpname
;
dpnt
=
tmpname
;
}
}
...
@@ -142,8 +143,8 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
...
@@ -142,8 +143,8 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
*/
*/
match
=
0
;
match
=
0
;
if
(
dlen
>
0
&&
if
(
dlen
>
0
&&
(
!
(
de
->
flags
[
-
dir
->
i_sb
->
u
.
isofs_sb
.
s_high_sierra
]
&
5
)
(
!
(
de
->
flags
[
-
sbi
->
s_high_sierra
]
&
5
)
||
dir
->
i_sb
->
u
.
isofs_sb
.
s_unhide
==
'y'
))
||
sbi
->
s_unhide
==
'y'
))
{
{
match
=
(
isofs_cmp
(
dentry
,
dpnt
,
dlen
)
==
0
);
match
=
(
isofs_cmp
(
dentry
,
dpnt
,
dlen
)
==
0
);
}
}
...
...
fs/isofs/rock.c
View file @
c3d7ae3b
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#define CHECK_SP(FAIL) \
#define CHECK_SP(FAIL) \
if(rr->u.SP.magic[0] != 0xbe) FAIL; \
if(rr->u.SP.magic[0] != 0xbe) FAIL; \
if(rr->u.SP.magic[1] != 0xef) FAIL; \
if(rr->u.SP.magic[1] != 0xef) FAIL; \
inode->i_sb->u.isofs_sb.
s_rock_offset=rr->u.SP.skip;
ISOFS_SB(inode->i_sb)->
s_rock_offset=rr->u.SP.skip;
/* We define a series of macros because each function must do exactly the
/* We define a series of macros because each function must do exactly the
same thing in certain places. We use the macros to ensure that everything
same thing in certain places. We use the macros to ensure that everything
is done correctly */
is done correctly */
...
@@ -51,10 +51,10 @@
...
@@ -51,10 +51,10 @@
if(LEN & 1) LEN++; \
if(LEN & 1) LEN++; \
CHR = ((unsigned char *) DE) + LEN; \
CHR = ((unsigned char *) DE) + LEN; \
LEN = *((unsigned char *) DE) - LEN; \
LEN = *((unsigned char *) DE) - LEN; \
if (
inode->i_sb->u.isofs_sb.
s_rock_offset!=-1) \
if (
ISOFS_SB(inode->i_sb)->
s_rock_offset!=-1) \
{ \
{ \
LEN-=
inode->i_sb->u.isofs_sb.
s_rock_offset; \
LEN-=
ISOFS_SB(inode->i_sb)->
s_rock_offset; \
CHR+=
inode->i_sb->u.isofs_sb.
s_rock_offset; \
CHR+=
ISOFS_SB(inode->i_sb)->
s_rock_offset; \
if (LEN<0) LEN=0; \
if (LEN<0) LEN=0; \
} \
} \
}
}
...
@@ -102,7 +102,7 @@ int find_rock_ridge_relocation(struct iso_directory_record * de,
...
@@ -102,7 +102,7 @@ int find_rock_ridge_relocation(struct iso_directory_record * de,
/* Return value if we do not find appropriate record. */
/* Return value if we do not find appropriate record. */
retval
=
isonum_733
(
de
->
extent
);
retval
=
isonum_733
(
de
->
extent
);
if
(
!
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock
)
return
retval
;
if
(
!
ISOFS_SB
(
inode
->
i_sb
)
->
s_rock
)
return
retval
;
SETUP_ROCK_RIDGE
(
de
,
chr
,
len
);
SETUP_ROCK_RIDGE
(
de
,
chr
,
len
);
repeat:
repeat:
...
@@ -162,7 +162,7 @@ int get_rock_ridge_filename(struct iso_directory_record * de,
...
@@ -162,7 +162,7 @@ int get_rock_ridge_filename(struct iso_directory_record * de,
CONTINUE_DECLS
;
CONTINUE_DECLS
;
int
retnamlen
=
0
,
truncate
=
0
;
int
retnamlen
=
0
,
truncate
=
0
;
if
(
!
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock
)
return
0
;
if
(
!
ISOFS_SB
(
inode
->
i_sb
)
->
s_rock
)
return
0
;
*
retname
=
0
;
*
retname
=
0
;
SETUP_ROCK_RIDGE
(
de
,
chr
,
len
);
SETUP_ROCK_RIDGE
(
de
,
chr
,
len
);
...
@@ -234,7 +234,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
...
@@ -234,7 +234,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
int
symlink_len
=
0
;
int
symlink_len
=
0
;
CONTINUE_DECLS
;
CONTINUE_DECLS
;
if
(
!
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock
)
return
0
;
if
(
!
ISOFS_SB
(
inode
->
i_sb
)
->
s_rock
)
return
0
;
SETUP_ROCK_RIDGE
(
de
,
chr
,
len
);
SETUP_ROCK_RIDGE
(
de
,
chr
,
len
);
if
(
regard_xa
)
if
(
regard_xa
)
...
@@ -272,7 +272,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
...
@@ -272,7 +272,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
CHECK_CE
;
CHECK_CE
;
break
;
break
;
case
SIG
(
'E'
,
'R'
):
case
SIG
(
'E'
,
'R'
):
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock
=
1
;
ISOFS_SB
(
inode
->
i_sb
)
->
s_rock
=
1
;
printk
(
KERN_DEBUG
"ISO 9660 Extensions: "
);
printk
(
KERN_DEBUG
"ISO 9660 Extensions: "
);
{
int
p
;
{
int
p
;
for
(
p
=
0
;
p
<
rr
->
u
.
ER
.
len_id
;
p
++
)
printk
(
"%c"
,
rr
->
u
.
ER
.
data
[
p
]);
for
(
p
=
0
;
p
<
rr
->
u
.
ER
.
len_id
;
p
++
)
printk
(
"%c"
,
rr
->
u
.
ER
.
data
[
p
]);
...
@@ -368,7 +368,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
...
@@ -368,7 +368,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
ISOFS_I
(
inode
)
->
i_first_extent
=
isonum_733
(
rr
->
u
.
CL
.
location
);
ISOFS_I
(
inode
)
->
i_first_extent
=
isonum_733
(
rr
->
u
.
CL
.
location
);
reloc
=
iget
(
inode
->
i_sb
,
reloc
=
iget
(
inode
->
i_sb
,
(
ISOFS_I
(
inode
)
->
i_first_extent
<<
(
ISOFS_I
(
inode
)
->
i_first_extent
<<
inode
->
i_sb
->
u
.
isofs_sb
.
s_log_zone_size
));
ISOFS_SB
(
inode
->
i_sb
)
->
s_log_zone_size
));
if
(
!
reloc
)
if
(
!
reloc
)
goto
out
;
goto
out
;
inode
->
i_mode
=
reloc
->
i_mode
;
inode
->
i_mode
=
reloc
->
i_mode
;
...
@@ -385,7 +385,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
...
@@ -385,7 +385,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
break
;
break
;
#ifdef CONFIG_ZISOFS
#ifdef CONFIG_ZISOFS
case
SIG
(
'Z'
,
'F'
):
case
SIG
(
'Z'
,
'F'
):
if
(
!
inode
->
i_sb
->
u
.
isofs_sb
.
s_nocompress
)
{
if
(
!
ISOFS_SB
(
inode
->
i_sb
)
->
s_nocompress
)
{
int
algo
;
int
algo
;
algo
=
isonum_721
(
rr
->
u
.
ZF
.
algorithm
);
algo
=
isonum_721
(
rr
->
u
.
ZF
.
algorithm
);
if
(
algo
==
SIG
(
'p'
,
'z'
)
)
{
if
(
algo
==
SIG
(
'p'
,
'z'
)
)
{
...
@@ -478,8 +478,8 @@ int parse_rock_ridge_inode(struct iso_directory_record * de,
...
@@ -478,8 +478,8 @@ int parse_rock_ridge_inode(struct iso_directory_record * de,
int
result
=
parse_rock_ridge_inode_internal
(
de
,
inode
,
0
);
int
result
=
parse_rock_ridge_inode_internal
(
de
,
inode
,
0
);
/* if rockridge flag was reset and we didn't look for attributes
/* if rockridge flag was reset and we didn't look for attributes
* behind eventual XA attributes, have a look there */
* behind eventual XA attributes, have a look there */
if
((
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock_offset
==-
1
)
if
((
ISOFS_SB
(
inode
->
i_sb
)
->
s_rock_offset
==-
1
)
&&
(
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock
==
2
))
&&
(
ISOFS_SB
(
inode
->
i_sb
)
->
s_rock
==
2
))
{
{
result
=
parse_rock_ridge_inode_internal
(
de
,
inode
,
14
);
result
=
parse_rock_ridge_inode_internal
(
de
,
inode
,
14
);
};
};
...
@@ -506,7 +506,7 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
...
@@ -506,7 +506,7 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
unsigned
char
*
chr
;
unsigned
char
*
chr
;
struct
rock_ridge
*
rr
;
struct
rock_ridge
*
rr
;
if
(
!
inode
->
i_sb
->
u
.
isofs_sb
.
s_rock
)
if
(
!
ISOFS_SB
(
inode
->
i_sb
)
->
s_rock
)
panic
(
"Cannot have symlink with high sierra variant of iso filesystem
\n
"
);
panic
(
"Cannot have symlink with high sierra variant of iso filesystem
\n
"
);
block
=
inode
->
i_ino
>>
bufbits
;
block
=
inode
->
i_ino
>>
bufbits
;
...
...
fs/udf/super.c
View file @
c3d7ae3b
...
@@ -1413,12 +1413,17 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
...
@@ -1413,12 +1413,17 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
struct
inode
*
inode
=
NULL
;
struct
inode
*
inode
=
NULL
;
struct
udf_options
uopt
;
struct
udf_options
uopt
;
lb_addr
rootdir
,
fileset
;
lb_addr
rootdir
,
fileset
;
struct
udf_sb_info
*
sbi
;
uopt
.
flags
=
(
1
<<
UDF_FLAG_USE_AD_IN_ICB
)
|
(
1
<<
UDF_FLAG_STRICT
);
uopt
.
flags
=
(
1
<<
UDF_FLAG_USE_AD_IN_ICB
)
|
(
1
<<
UDF_FLAG_STRICT
);
uopt
.
uid
=
-
1
;
uopt
.
uid
=
-
1
;
uopt
.
gid
=
-
1
;
uopt
.
gid
=
-
1
;
uopt
.
umask
=
0
;
uopt
.
umask
=
0
;
sbi
=
kmalloc
(
sizeof
(
struct
udf_sb_info
),
GFP_KERNEL
);
if
(
!
sbi
)
return
-
ENOMEM
;
sb
->
u
.
generic_sbp
=
sbi
;
memset
(
UDF_SB
(
sb
),
0x00
,
sizeof
(
struct
udf_sb_info
));
memset
(
UDF_SB
(
sb
),
0x00
,
sizeof
(
struct
udf_sb_info
));
#if UDFFS_RW != 1
#if UDFFS_RW != 1
...
@@ -1607,6 +1612,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
...
@@ -1607,6 +1612,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
udf_close_lvid
(
sb
);
udf_close_lvid
(
sb
);
udf_release_data
(
UDF_SB_LVIDBH
(
sb
));
udf_release_data
(
UDF_SB_LVIDBH
(
sb
));
UDF_SB_FREE
(
sb
);
UDF_SB_FREE
(
sb
);
kfree
(
sbi
);
sb
->
u
.
generic_sbp
=
NULL
;
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -1697,6 +1704,8 @@ udf_put_super(struct super_block *sb)
...
@@ -1697,6 +1704,8 @@ udf_put_super(struct super_block *sb)
udf_close_lvid
(
sb
);
udf_close_lvid
(
sb
);
udf_release_data
(
UDF_SB_LVIDBH
(
sb
));
udf_release_data
(
UDF_SB_LVIDBH
(
sb
));
UDF_SB_FREE
(
sb
);
UDF_SB_FREE
(
sb
);
kfree
(
sb
->
u
.
generic_sbp
);
sb
->
u
.
generic_sbp
=
NULL
;
}
}
/*
/*
...
...
fs/udf/udf_sb.h
View file @
c3d7ae3b
...
@@ -30,6 +30,11 @@
...
@@ -30,6 +30,11 @@
#define UDF_PART_FLAG_REWRITABLE 0x0040
#define UDF_PART_FLAG_REWRITABLE 0x0040
#define UDF_PART_FLAG_OVERWRITABLE 0x0080
#define UDF_PART_FLAG_OVERWRITABLE 0x0080
static
inline
struct
udf_sb_info
*
UDF_SB
(
struct
super_block
*
sb
)
{
return
sb
->
u
.
generic_sbp
;
}
#define UDF_SB_FREE(X)\
#define UDF_SB_FREE(X)\
{\
{\
if (UDF_SB(X))\
if (UDF_SB(X))\
...
@@ -39,7 +44,6 @@
...
@@ -39,7 +44,6 @@
UDF_SB_PARTMAPS(X) = NULL;\
UDF_SB_PARTMAPS(X) = NULL;\
}\
}\
}
}
#define UDF_SB(X) (&((X)->u.udf_sb))
#define UDF_SB_ALLOC_PARTMAPS(X,Y)\
#define UDF_SB_ALLOC_PARTMAPS(X,Y)\
{\
{\
...
...
fs/udf/udfdecl.h
View file @
c3d7ae3b
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/config.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/udf_fs_i.h>
#include <linux/udf_fs_sb.h>
#ifndef LINUX_VERSION_CODE
#ifndef LINUX_VERSION_CODE
#include <linux/version.h>
#include <linux/version.h>
...
@@ -15,8 +17,6 @@
...
@@ -15,8 +17,6 @@
#if !defined(CONFIG_UDF_FS) && !defined(CONFIG_UDF_FS_MODULE)
#if !defined(CONFIG_UDF_FS) && !defined(CONFIG_UDF_FS_MODULE)
#define CONFIG_UDF_FS_MODULE
#define CONFIG_UDF_FS_MODULE
#include <linux/udf_fs_i.h>
#include <linux/udf_fs_sb.h>
#endif
#endif
#include "udfend.h"
#include "udfend.h"
...
...
include/asm-ppc/siginfo.h
View file @
c3d7ae3b
...
@@ -99,7 +99,6 @@ typedef struct siginfo {
...
@@ -99,7 +99,6 @@ typedef struct siginfo {
/*
/*
* si_code values
* si_code values
* Digital reserves positive values for kernel-generated signals.
*/
*/
#define SI_USER 0
/* sent by kill, sigsend, raise */
#define SI_USER 0
/* sent by kill, sigsend, raise */
#define SI_KERNEL 0x80
/* sent by the kernel from somewhere */
#define SI_KERNEL 0x80
/* sent by the kernel from somewhere */
...
@@ -109,6 +108,7 @@ typedef struct siginfo {
...
@@ -109,6 +108,7 @@ typedef struct siginfo {
#define SI_ASYNCIO -4
/* sent by AIO completion */
#define SI_ASYNCIO -4
/* sent by AIO completion */
#define SI_SIGIO -5
/* sent by queued SIGIO */
#define SI_SIGIO -5
/* sent by queued SIGIO */
#define SI_TKILL -6
/* sent by tkill system call */
#define SI_TKILL -6
/* sent by tkill system call */
#define SI_DETHREAD -7
/* sent by execve() killing subsidiary threads */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
...
...
include/asm-ppc/thread_info.h
View file @
c3d7ae3b
...
@@ -22,6 +22,7 @@ struct thread_info {
...
@@ -22,6 +22,7 @@ struct thread_info {
struct
exec_domain
*
exec_domain
;
/* execution domain */
struct
exec_domain
*
exec_domain
;
/* execution domain */
unsigned
long
flags
;
/* low level flags */
unsigned
long
flags
;
/* low level flags */
int
cpu
;
/* cpu we're on */
int
cpu
;
/* cpu we're on */
int
preempt_count
;
/* not used at present */
};
};
/*
/*
...
...
include/linux/fs.h
View file @
c3d7ae3b
...
@@ -648,7 +648,6 @@ struct quota_mount_options
...
@@ -648,7 +648,6 @@ struct quota_mount_options
#include <linux/ext3_fs_sb.h>
#include <linux/ext3_fs_sb.h>
#include <linux/hpfs_fs_sb.h>
#include <linux/hpfs_fs_sb.h>
#include <linux/ntfs_fs_sb.h>
#include <linux/ntfs_fs_sb.h>
#include <linux/iso_fs_sb.h>
#include <linux/sysv_fs_sb.h>
#include <linux/sysv_fs_sb.h>
#include <linux/affs_fs_sb.h>
#include <linux/affs_fs_sb.h>
#include <linux/ufs_fs_sb.h>
#include <linux/ufs_fs_sb.h>
...
@@ -657,7 +656,6 @@ struct quota_mount_options
...
@@ -657,7 +656,6 @@ struct quota_mount_options
#include <linux/adfs_fs_sb.h>
#include <linux/adfs_fs_sb.h>
#include <linux/reiserfs_fs_sb.h>
#include <linux/reiserfs_fs_sb.h>
#include <linux/bfs_fs_sb.h>
#include <linux/bfs_fs_sb.h>
#include <linux/udf_fs_sb.h>
extern
struct
list_head
super_blocks
;
extern
struct
list_head
super_blocks
;
extern
spinlock_t
sb_lock
;
extern
spinlock_t
sb_lock
;
...
@@ -696,7 +694,6 @@ struct super_block {
...
@@ -696,7 +694,6 @@ struct super_block {
struct
ext3_sb_info
ext3_sb
;
struct
ext3_sb_info
ext3_sb
;
struct
hpfs_sb_info
hpfs_sb
;
struct
hpfs_sb_info
hpfs_sb
;
struct
ntfs_sb_info
ntfs_sb
;
struct
ntfs_sb_info
ntfs_sb
;
struct
isofs_sb_info
isofs_sb
;
struct
sysv_sb_info
sysv_sb
;
struct
sysv_sb_info
sysv_sb
;
struct
affs_sb_info
affs_sb
;
struct
affs_sb_info
affs_sb
;
struct
ufs_sb_info
ufs_sb
;
struct
ufs_sb_info
ufs_sb
;
...
@@ -706,7 +703,6 @@ struct super_block {
...
@@ -706,7 +703,6 @@ struct super_block {
struct
adfs_sb_info
adfs_sb
;
struct
adfs_sb_info
adfs_sb
;
struct
reiserfs_sb_info
reiserfs_sb
;
struct
reiserfs_sb_info
reiserfs_sb
;
struct
bfs_sb_info
bfs_sb
;
struct
bfs_sb_info
bfs_sb
;
struct
udf_sb_info
udf_sb
;
void
*
generic_sbp
;
void
*
generic_sbp
;
}
u
;
}
u
;
/*
/*
...
...
include/linux/if_wanpipe.h
View file @
c3d7ae3b
...
@@ -122,6 +122,7 @@ struct wanpipe_opt
...
@@ -122,6 +122,7 @@ struct wanpipe_opt
unsigned
poll_cnt
;
unsigned
poll_cnt
;
unsigned
char
force
;
/* Used to force sock release */
unsigned
char
force
;
/* Used to force sock release */
atomic_t
packet_sent
;
atomic_t
packet_sent
;
unsigned
short
num
;
};
};
#define wp_sk(__sk) ((struct wanpipe_opt *)(__sk)->protinfo)
#define wp_sk(__sk) ((struct wanpipe_opt *)(__sk)->protinfo)
...
...
include/linux/iso_fs.h
View file @
c3d7ae3b
...
@@ -160,7 +160,6 @@ struct iso_directory_record {
...
@@ -160,7 +160,6 @@ struct iso_directory_record {
#define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize)
#define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize)
#define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits)
#define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits)
#define ISOFS_ZONE_BITS(INODE) ((INODE)->i_sb->u.isofs_sb.s_log_zone_size)
#define ISOFS_SUPER_MAGIC 0x9660
#define ISOFS_SUPER_MAGIC 0x9660
...
@@ -171,6 +170,12 @@ struct iso_directory_record {
...
@@ -171,6 +170,12 @@ struct iso_directory_record {
#include <asm/byteorder.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
#include <asm/unaligned.h>
#include <linux/iso_fs_i.h>
#include <linux/iso_fs_i.h>
#include <linux/iso_fs_sb.h>
static
inline
struct
isofs_sb_info
*
ISOFS_SB
(
struct
super_block
*
sb
)
{
return
sb
->
u
.
generic_sbp
;
}
static
inline
struct
iso_inode_info
*
ISOFS_I
(
struct
inode
*
inode
)
static
inline
struct
iso_inode_info
*
ISOFS_I
(
struct
inode
*
inode
)
{
{
...
...
net/ipv4/netfilter/ip_conntrack_standalone.c
View file @
c3d7ae3b
...
@@ -38,7 +38,7 @@ MODULE_LICENSE("GPL");
...
@@ -38,7 +38,7 @@ MODULE_LICENSE("GPL");
static
int
kill_proto
(
const
struct
ip_conntrack
*
i
,
void
*
data
)
static
int
kill_proto
(
const
struct
ip_conntrack
*
i
,
void
*
data
)
{
{
return
(
i
->
tuplehash
[
IP_CT_DIR_ORIGINAL
].
dst
.
protonum
==
return
(
i
->
tuplehash
[
IP_CT_DIR_ORIGINAL
].
tuple
.
dst
.
protonum
==
*
((
u_int8_t
*
)
data
));
*
((
u_int8_t
*
)
data
));
}
}
...
...
net/wanrouter/af_wanpipe.c
View file @
c3d7ae3b
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
* Alan Cox.
* Alan Cox.
* X25 socket Author: Jonathan Naylor.
* X25 socket Author: Jonathan Naylor.
* ============================================================================
* ============================================================================
* Mar 15, 2002 Arnaldo C. Melo o Use wp_sk()->num, as it isnt anymore in sock
* Apr 25, 2000 Nenad Corbic o Added the ability to send zero length packets.
* Apr 25, 2000 Nenad Corbic o Added the ability to send zero length packets.
* Mar 13, 2000 Nenad Corbic o Added a tx buffer check via ioctl call.
* Mar 13, 2000 Nenad Corbic o Added a tx buffer check via ioctl call.
* Mar 06, 2000 Nenad Corbic o Fixed the corrupt sock lcn problem.
* Mar 06, 2000 Nenad Corbic o Fixed the corrupt sock lcn problem.
...
@@ -164,11 +165,11 @@ static void dbg_kfree(void * v, int line) {
...
@@ -164,11 +165,11 @@ static void dbg_kfree(void * v, int line) {
/* List of all wanpipe sockets. */
/* List of all wanpipe sockets. */
struct
sock
*
wanpipe_sklist
=
NULL
;
struct
sock
*
wanpipe_sklist
;
static
rwlock_t
wanpipe_sklist_lock
=
RW_LOCK_UNLOCKED
;
static
rwlock_t
wanpipe_sklist_lock
=
RW_LOCK_UNLOCKED
;
atomic_t
wanpipe_socks_nr
;
atomic_t
wanpipe_socks_nr
;
static
unsigned
long
wanpipe_tx_critical
=
0
;
static
unsigned
long
wanpipe_tx_critical
;
#if 0
#if 0
/* Private wanpipe socket structures. */
/* Private wanpipe socket structures. */
...
@@ -187,9 +188,9 @@ struct wanpipe_opt
...
@@ -187,9 +188,9 @@ struct wanpipe_opt
};
};
#endif
#endif
static
int
sk_count
=
0
;
static
int
sk_count
;
extern
struct
proto_ops
wanpipe_ops
;
extern
struct
proto_ops
wanpipe_ops
;
static
unsigned
long
find_free_critical
=
0
;
static
unsigned
long
find_free_critical
;
static
void
wanpipe_unlink_driver
(
struct
sock
*
);
static
void
wanpipe_unlink_driver
(
struct
sock
*
);
static
void
wanpipe_link_driver
(
netdevice_t
*
,
struct
sock
*
sk
);
static
void
wanpipe_link_driver
(
netdevice_t
*
,
struct
sock
*
sk
);
...
@@ -400,9 +401,9 @@ static int wanpipe_listen_rcv (struct sk_buff *skb, struct sock *sk)
...
@@ -400,9 +401,9 @@ static int wanpipe_listen_rcv (struct sk_buff *skb, struct sock *sk)
card
->
u
.
x
.
svc_to_dev_map
[(
chan
->
lcn
%
MAX_X25_LCN
)]
=
dev
;
card
->
u
.
x
.
svc_to_dev_map
[(
chan
->
lcn
%
MAX_X25_LCN
)]
=
dev
;
newsk
->
zapped
=
0
;
newsk
->
zapped
=
0
;
new
sk
->
num
=
htons
(
X25_PROT
);
new
wp
->
num
=
htons
(
X25_PROT
);
if
(
wanpipe_do_bind
(
newsk
,
dev
,
newsk
->
num
))
{
if
(
wanpipe_do_bind
(
newsk
,
dev
,
newwp
->
num
))
{
wanpipe_kill_sock_irq
(
newsk
);
wanpipe_kill_sock_irq
(
newsk
);
release_device
(
dev
);
release_device
(
dev
);
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -470,7 +471,7 @@ static struct sock *wanpipe_make_new(struct sock *osk)
...
@@ -470,7 +471,7 @@ static struct sock *wanpipe_make_new(struct sock *osk)
sk
->
socket
=
osk
->
socket
;
sk
->
socket
=
osk
->
socket
;
sk
->
priority
=
osk
->
priority
;
sk
->
priority
=
osk
->
priority
;
sk
->
protocol
=
osk
->
protocol
;
sk
->
protocol
=
osk
->
protocol
;
sk
->
num
=
osk
->
num
;
wp_sk
(
sk
)
->
num
=
wp_sk
(
osk
)
->
num
;
sk
->
rcvbuf
=
osk
->
rcvbuf
;
sk
->
rcvbuf
=
osk
->
rcvbuf
;
sk
->
sndbuf
=
osk
->
sndbuf
;
sk
->
sndbuf
=
osk
->
sndbuf
;
sk
->
debug
=
osk
->
debug
;
sk
->
debug
=
osk
->
debug
;
...
@@ -566,9 +567,11 @@ static int wanpipe_sendmsg(struct socket *sock, struct msghdr *msg, int len,
...
@@ -566,9 +567,11 @@ static int wanpipe_sendmsg(struct socket *sock, struct msghdr *msg, int len,
if
(
len
<
sizeof
(
x25api_hdr_t
))
if
(
len
<
sizeof
(
x25api_hdr_t
))
return
-
EINVAL
;
return
-
EINVAL
;
wp
=
wp_sk
(
sk
);
if
(
saddr
==
NULL
)
{
if
(
saddr
==
NULL
)
{
ifindex
=
sk
->
bound_dev_if
;
ifindex
=
sk
->
bound_dev_if
;
proto
=
sk
->
num
;
proto
=
wp
->
num
;
addr
=
NULL
;
addr
=
NULL
;
}
else
{
}
else
{
...
@@ -648,7 +651,6 @@ static int wanpipe_sendmsg(struct socket *sock, struct msghdr *msg, int len,
...
@@ -648,7 +651,6 @@ static int wanpipe_sendmsg(struct socket *sock, struct msghdr *msg, int len,
}
}
skb_queue_tail
(
&
sk
->
write_queue
,
skb
);
skb_queue_tail
(
&
sk
->
write_queue
,
skb
);
wp
=
wp_sk
(
sk
);
atomic_inc
(
&
wp
->
packet_sent
);
atomic_inc
(
&
wp
->
packet_sent
);
if
(
!
(
test_and_set_bit
(
0
,
&
wp
->
timer
))){
if
(
!
(
test_and_set_bit
(
0
,
&
wp
->
timer
))){
...
@@ -998,7 +1000,8 @@ static int wanpipe_release(struct socket *sock, struct socket *peersock)
...
@@ -998,7 +1000,8 @@ static int wanpipe_release(struct socket *sock, struct socket *peersock)
* Unhook packet receive handler.
* Unhook packet receive handler.
*/
*/
if
(
sk
->
num
==
htons
(
X25_PROT
)
&&
sk
->
state
!=
WANSOCK_DISCONNECTED
&&
sk
->
zapped
){
if
(
wp
->
num
==
htons
(
X25_PROT
)
&&
sk
->
state
!=
WANSOCK_DISCONNECTED
&&
sk
->
zapped
)
{
netdevice_t
*
dev
=
dev_get_by_index
(
sk
->
bound_dev_if
);
netdevice_t
*
dev
=
dev_get_by_index
(
sk
->
bound_dev_if
);
wanpipe_common_t
*
chan
;
wanpipe_common_t
*
chan
;
if
(
dev
){
if
(
dev
){
...
@@ -1206,7 +1209,8 @@ static void wanpipe_kill_sock_timer (unsigned long data)
...
@@ -1206,7 +1209,8 @@ static void wanpipe_kill_sock_timer (unsigned long data)
write_unlock
(
&
wanpipe_sklist_lock
);
write_unlock
(
&
wanpipe_sklist_lock
);
if
(
sk
->
num
==
htons
(
X25_PROT
)
&&
sk
->
state
!=
WANSOCK_DISCONNECTED
){
if
(
wp_sk
(
sk
)
->
num
==
htons
(
X25_PROT
)
&&
sk
->
state
!=
WANSOCK_DISCONNECTED
){
netdevice_t
*
dev
=
dev_get_by_index
(
sk
->
bound_dev_if
);
netdevice_t
*
dev
=
dev_get_by_index
(
sk
->
bound_dev_if
);
wanpipe_common_t
*
chan
;
wanpipe_common_t
*
chan
;
if
(
dev
){
if
(
dev
){
...
@@ -1352,6 +1356,7 @@ static void wanpipe_kill_sock_irq (struct sock *sk)
...
@@ -1352,6 +1356,7 @@ static void wanpipe_kill_sock_irq (struct sock *sk)
static
int
wanpipe_do_bind
(
struct
sock
*
sk
,
netdevice_t
*
dev
,
int
protocol
)
static
int
wanpipe_do_bind
(
struct
sock
*
sk
,
netdevice_t
*
dev
,
int
protocol
)
{
{
wanpipe_opt
*
wp
=
wp_sk
(
sk
);
wanpipe_common_t
*
chan
=
NULL
;
wanpipe_common_t
*
chan
=
NULL
;
int
err
=
0
;
int
err
=
0
;
...
@@ -1360,7 +1365,7 @@ static int wanpipe_do_bind(struct sock *sk, netdevice_t *dev, int protocol)
...
@@ -1360,7 +1365,7 @@ static int wanpipe_do_bind(struct sock *sk, netdevice_t *dev, int protocol)
goto
bind_unlock_exit
;
goto
bind_unlock_exit
;
}
}
sk
->
num
=
protocol
;
wp
->
num
=
protocol
;
if
(
protocol
==
0
){
if
(
protocol
==
0
){
release_device
(
dev
);
release_device
(
dev
);
...
@@ -1373,7 +1378,7 @@ static int wanpipe_do_bind(struct sock *sk, netdevice_t *dev, int protocol)
...
@@ -1373,7 +1378,7 @@ static int wanpipe_do_bind(struct sock *sk, netdevice_t *dev, int protocol)
chan
=
dev
->
priv
;
chan
=
dev
->
priv
;
sk
->
state
=
chan
->
state
;
sk
->
state
=
chan
->
state
;
if
(
sk
->
num
==
htons
(
X25_PROT
)
&&
if
(
wp
->
num
==
htons
(
X25_PROT
)
&&
sk
->
state
!=
WANSOCK_DISCONNECTED
&&
sk
->
state
!=
WANSOCK_DISCONNECTED
&&
sk
->
state
!=
WANSOCK_CONNECTING
){
sk
->
state
!=
WANSOCK_CONNECTING
){
DBG_PRINTK
(
KERN_INFO
DBG_PRINTK
(
KERN_INFO
...
@@ -1388,7 +1393,7 @@ static int wanpipe_do_bind(struct sock *sk, netdevice_t *dev, int protocol)
...
@@ -1388,7 +1393,7 @@ static int wanpipe_do_bind(struct sock *sk, netdevice_t *dev, int protocol)
sk
->
bound_dev_if
=
dev
->
ifindex
;
sk
->
bound_dev_if
=
dev
->
ifindex
;
/* X25 Specific option */
/* X25 Specific option */
if
(
sk
->
num
==
htons
(
X25_PROT
))
if
(
wp
->
num
==
htons
(
X25_PROT
))
wp_sk
(
sk
)
->
svc
=
chan
->
svc
;
wp_sk
(
sk
)
->
svc
=
chan
->
svc
;
}
else
{
}
else
{
...
@@ -1421,6 +1426,7 @@ static int wanpipe_bind(struct socket *sock, struct sockaddr *uaddr, int addr_le
...
@@ -1421,6 +1426,7 @@ static int wanpipe_bind(struct socket *sock, struct sockaddr *uaddr, int addr_le
{
{
struct
wan_sockaddr_ll
*
sll
=
(
struct
wan_sockaddr_ll
*
)
uaddr
;
struct
wan_sockaddr_ll
*
sll
=
(
struct
wan_sockaddr_ll
*
)
uaddr
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
wanpipe_opt
*
wp
=
wp_sk
(
sk
);
netdevice_t
*
dev
=
NULL
;
netdevice_t
*
dev
=
NULL
;
sdla_t
*
card
=
NULL
;
sdla_t
*
card
=
NULL
;
char
name
[
15
];
char
name
[
15
];
...
@@ -1462,7 +1468,7 @@ static int wanpipe_bind(struct socket *sock, struct sockaddr *uaddr, int addr_le
...
@@ -1462,7 +1468,7 @@ static int wanpipe_bind(struct socket *sock, struct sockaddr *uaddr, int addr_le
return
err
;
return
err
;
if
(
sll
->
sll_protocol
)
if
(
sll
->
sll_protocol
)
sk
->
num
=
sll
->
sll_protocol
;
wp
->
num
=
sll
->
sll_protocol
;
sk
->
state
=
WANSOCK_BIND_LISTEN
;
sk
->
state
=
WANSOCK_BIND_LISTEN
;
return
0
;
return
0
;
...
@@ -1509,7 +1515,7 @@ static int wanpipe_bind(struct socket *sock, struct sockaddr *uaddr, int addr_le
...
@@ -1509,7 +1515,7 @@ static int wanpipe_bind(struct socket *sock, struct sockaddr *uaddr, int addr_le
return
-
EINVAL
;
return
-
EINVAL
;
}
}
return
wanpipe_do_bind
(
sk
,
dev
,
sll
->
sll_protocol
?
:
sk
->
num
);
return
wanpipe_do_bind
(
sk
,
dev
,
sll
->
sll_protocol
?
:
wp
->
num
);
}
}
/*============================================================
/*============================================================
...
@@ -1613,7 +1619,7 @@ static int wanpipe_create(struct socket *sock, int protocol)
...
@@ -1613,7 +1619,7 @@ static int wanpipe_create(struct socket *sock, int protocol)
sk
->
zapped
=
0
;
sk
->
zapped
=
0
;
sk
->
family
=
PF_WANPIPE
;
sk
->
family
=
PF_WANPIPE
;
sk
->
num
=
protocol
;
wp_sk
(
sk
)
->
num
=
protocol
;
sk
->
state
=
WANSOCK_DISCONNECTED
;
sk
->
state
=
WANSOCK_DISCONNECTED
;
sk
->
ack_backlog
=
0
;
sk
->
ack_backlog
=
0
;
sk
->
bound_dev_if
=
0
;
sk
->
bound_dev_if
=
0
;
...
@@ -1774,7 +1780,7 @@ static int wanpipe_getname(struct socket *sock, struct sockaddr *uaddr,
...
@@ -1774,7 +1780,7 @@ static int wanpipe_getname(struct socket *sock, struct sockaddr *uaddr,
sll
->
sll_family
=
AF_WANPIPE
;
sll
->
sll_family
=
AF_WANPIPE
;
sll
->
sll_ifindex
=
sk
->
bound_dev_if
;
sll
->
sll_ifindex
=
sk
->
bound_dev_if
;
sll
->
sll_protocol
=
sk
->
num
;
sll
->
sll_protocol
=
wp_sk
(
sk
)
->
num
;
dev
=
dev_get_by_index
(
sk
->
bound_dev_if
);
dev
=
dev_get_by_index
(
sk
->
bound_dev_if
);
if
(
dev
)
{
if
(
dev
)
{
sll
->
sll_hatype
=
dev
->
type
;
sll
->
sll_hatype
=
dev
->
type
;
...
@@ -1836,7 +1842,8 @@ static int wanpipe_notifier(struct notifier_block *this, unsigned long msg, void
...
@@ -1836,7 +1842,8 @@ static int wanpipe_notifier(struct notifier_block *this, unsigned long msg, void
}
}
break
;
break
;
case
NETDEV_UP
:
case
NETDEV_UP
:
if
(
dev
->
ifindex
==
sk
->
bound_dev_if
&&
sk
->
num
&&
!
sk
->
zapped
)
{
if
(
dev
->
ifindex
==
sk
->
bound_dev_if
&&
po
->
num
&&
!
sk
->
zapped
)
{
printk
(
KERN_INFO
"wansock: Registering Device: %s
\n
"
,
printk
(
KERN_INFO
"wansock: Registering Device: %s
\n
"
,
dev
->
name
);
dev
->
name
);
wanpipe_link_driver
(
dev
,
sk
);
wanpipe_link_driver
(
dev
,
sk
);
...
@@ -2242,7 +2249,7 @@ unsigned int wanpipe_poll(struct file * file, struct socket *sock, poll_table *w
...
@@ -2242,7 +2249,7 @@ unsigned int wanpipe_poll(struct file * file, struct socket *sock, poll_table *w
* where multiple packets can be pending in the socket
* where multiple packets can be pending in the socket
* transmit queue */
* transmit queue */
if
(
sk
->
num
==
htons
(
X25_PROT
))
{
if
(
wp_sk
(
sk
)
->
num
==
htons
(
X25_PROT
))
{
if
(
atomic_read
(
&
wp_sk
(
sk
)
->
packet_sent
))
if
(
atomic_read
(
&
wp_sk
(
sk
)
->
packet_sent
))
return
mask
;
return
mask
;
}
}
...
@@ -2274,7 +2281,7 @@ static int wanpipe_listen(struct socket *sock, int backlog)
...
@@ -2274,7 +2281,7 @@ static int wanpipe_listen(struct socket *sock, int backlog)
/* This is x25 specific area if protocol doesn't
/* This is x25 specific area if protocol doesn't
* match, return error */
* match, return error */
if
(
sk
->
num
!=
htons
(
X25_PROT
))
if
(
wp_sk
(
sk
)
->
num
!=
htons
(
X25_PROT
))
return
-
EINVAL
;
return
-
EINVAL
;
if
(
sk
->
state
==
WANSOCK_BIND_LISTEN
)
{
if
(
sk
->
state
==
WANSOCK_BIND_LISTEN
)
{
...
@@ -2352,7 +2359,7 @@ static int wanpipe_exec_cmd(struct sock *sk, int cmd, unsigned int flags)
...
@@ -2352,7 +2359,7 @@ static int wanpipe_exec_cmd(struct sock *sk, int cmd, unsigned int flags)
/* This is x25 specific area if protocol doesn't
/* This is x25 specific area if protocol doesn't
* match, return error */
* match, return error */
if
(
sk
->
num
!=
htons
(
X25_PROT
))
if
(
wp
->
num
!=
htons
(
X25_PROT
))
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -2535,7 +2542,7 @@ static int wanpipe_accept(struct socket *sock, struct socket *newsock, int flags
...
@@ -2535,7 +2542,7 @@ static int wanpipe_accept(struct socket *sock, struct socket *newsock, int flags
if
(
sk
->
state
!=
WANSOCK_LISTEN
)
if
(
sk
->
state
!=
WANSOCK_LISTEN
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
sk
->
num
!=
htons
(
X25_PROT
))
if
(
wp_sk
(
sk
)
->
num
!=
htons
(
X25_PROT
))
return
-
EINVAL
;
return
-
EINVAL
;
add_wait_queue
(
sk
->
sleep
,
&
wait
);
add_wait_queue
(
sk
->
sleep
,
&
wait
);
...
@@ -2628,7 +2635,7 @@ static int wanpipe_connect(struct socket *sock, struct sockaddr *uaddr, int addr
...
@@ -2628,7 +2635,7 @@ static int wanpipe_connect(struct socket *sock, struct sockaddr *uaddr, int addr
netdevice_t
*
dev
;
netdevice_t
*
dev
;
int
err
;
int
err
;
if
(
sk
->
num
!=
htons
(
X25_PROT
))
if
(
wp_sk
(
sk
)
->
num
!=
htons
(
X25_PROT
))
return
-
EINVAL
;
return
-
EINVAL
;
if
(
sk
->
state
==
WANSOCK_CONNECTED
)
if
(
sk
->
state
==
WANSOCK_CONNECTED
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment