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
nexedi
linux
Commits
26c9952a
Commit
26c9952a
authored
Oct 07, 2002
by
Jeff Dike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated initializers in the block driver.
Fixed a process exit bug.
parent
f234e508
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
27 deletions
+28
-27
arch/um/drivers/ubd_kern.c
arch/um/drivers/ubd_kern.c
+26
-26
arch/um/kernel/process_kern.c
arch/um/kernel/process_kern.c
+2
-1
No files found.
arch/um/drivers/ubd_kern.c
View file @
26c9952a
...
@@ -56,10 +56,10 @@ static int ubd_revalidate(kdev_t rdev);
...
@@ -56,10 +56,10 @@ static int ubd_revalidate(kdev_t rdev);
#define DEVICE_NR(n) (minor(n) >> UBD_SHIFT)
#define DEVICE_NR(n) (minor(n) >> UBD_SHIFT)
static
struct
block_device_operations
ubd_blops
=
{
static
struct
block_device_operations
ubd_blops
=
{
open:
ubd_open
,
.
open
=
ubd_open
,
release:
ubd_release
,
.
release
=
ubd_release
,
ioctl:
ubd_ioctl
,
.
ioctl
=
ubd_ioctl
,
revalidate:
ubd_revalidate
,
.
revalidate
=
ubd_revalidate
,
};
};
static
request_queue_t
*
ubd_queue
;
static
request_queue_t
*
ubd_queue
;
...
@@ -69,9 +69,9 @@ static struct gendisk *ubd_gendisk[MAX_DEV];
...
@@ -69,9 +69,9 @@ static struct gendisk *ubd_gendisk[MAX_DEV];
static
struct
gendisk
*
fake_gendisk
[
MAX_DEV
];
static
struct
gendisk
*
fake_gendisk
[
MAX_DEV
];
#ifdef CONFIG_BLK_DEV_UBD_SYNC
#ifdef CONFIG_BLK_DEV_UBD_SYNC
#define OPEN_FLAGS ((struct openflags) {
r : 1, w : 1, s : 1, c :
0 })
#define OPEN_FLAGS ((struct openflags) {
.r = 1, .w = 1, .s = 1, .c =
0 })
#else
#else
#define OPEN_FLAGS ((struct openflags) {
r : 1, w : 1, s : 0, c :
0 })
#define OPEN_FLAGS ((struct openflags) {
.r = 1, .w = 1, .s = 0, .c =
0 })
#endif
#endif
static
struct
openflags
global_openflags
=
OPEN_FLAGS
;
static
struct
openflags
global_openflags
=
OPEN_FLAGS
;
...
@@ -99,24 +99,24 @@ struct ubd {
...
@@ -99,24 +99,24 @@ struct ubd {
};
};
#define DEFAULT_COW { \
#define DEFAULT_COW { \
file:
NULL, \
.file =
NULL, \
fd:
-1, \
.fd =
-1, \
bitmap:
NULL, \
.bitmap =
NULL, \
bitmap_offset:
0, \
.bitmap_offset =
0, \
data_offset:
0, \
.data_offset =
0, \
}
}
#define DEFAULT_UBD { \
#define DEFAULT_UBD { \
file:
NULL, \
.file =
NULL, \
is_dir:
0, \
.is_dir =
0, \
count:
0, \
.count =
0, \
fd:
-1, \
.fd =
-1, \
size:
-1, \
.size =
-1, \
boot_openflags:
OPEN_FLAGS, \
.boot_openflags =
OPEN_FLAGS, \
openflags:
OPEN_FLAGS, \
.openflags =
OPEN_FLAGS, \
real:
NULL, \
.real =
NULL, \
fake:
NULL, \
.fake =
NULL, \
cow:
DEFAULT_COW, \
.cow =
DEFAULT_COW, \
}
}
struct
ubd
ubd_dev
[
MAX_DEV
]
=
{
[
0
...
MAX_DEV
-
1
]
=
DEFAULT_UBD
};
struct
ubd
ubd_dev
[
MAX_DEV
]
=
{
[
0
...
MAX_DEV
-
1
]
=
DEFAULT_UBD
};
...
@@ -131,9 +131,9 @@ static int ubd0_init(void)
...
@@ -131,9 +131,9 @@ static int ubd0_init(void)
__initcall
(
ubd0_init
);
__initcall
(
ubd0_init
);
static
struct
hd_driveid
ubd_id
=
{
static
struct
hd_driveid
ubd_id
=
{
cyls:
0
,
.
cyls
=
0
,
heads:
128
,
.
heads
=
128
,
sectors:
32
,
.
sectors
=
32
,
};
};
static
int
fake_ide
=
0
;
static
int
fake_ide
=
0
;
...
@@ -199,7 +199,7 @@ static int ubd_setup_common(char *str, int *index_out)
...
@@ -199,7 +199,7 @@ static int ubd_setup_common(char *str, int *index_out)
{
{
struct
openflags
flags
=
global_openflags
;
struct
openflags
flags
=
global_openflags
;
char
*
backing_file
;
char
*
backing_file
;
int
i
,
n
;
int
n
;
if
(
index_out
)
*
index_out
=
-
1
;
if
(
index_out
)
*
index_out
=
-
1
;
n
=
*
str
++
;
n
=
*
str
++
;
...
@@ -886,7 +886,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
...
@@ -886,7 +886,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
static
int
ubd_revalidate
(
kdev_t
rdev
)
static
int
ubd_revalidate
(
kdev_t
rdev
)
{
{
__u64
size
;
__u64
size
;
int
n
,
offset
,
err
;
int
n
,
err
;
struct
ubd
*
dev
;
struct
ubd
*
dev
;
n
=
minor
(
rdev
)
>>
UBD_SHIFT
;
n
=
minor
(
rdev
)
>>
UBD_SHIFT
;
...
...
arch/um/kernel/process_kern.c
View file @
26c9952a
...
@@ -234,7 +234,8 @@ void *switch_to(void *prev, void *next, void *last)
...
@@ -234,7 +234,8 @@ void *switch_to(void *prev, void *next, void *last)
panic
(
"write of switch_pipe failed, errno = %d"
,
-
err
);
panic
(
"write of switch_pipe failed, errno = %d"
,
-
err
);
reading
=
1
;
reading
=
1
;
if
(
from
->
state
==
TASK_ZOMBIE
)
os_kill_process
(
os_getpid
());
if
((
from
->
state
==
TASK_ZOMBIE
)
||
(
from
->
state
==
TASK_DEAD
))
os_kill_process
(
os_getpid
());
err
=
user_read
(
from
->
thread
.
switch_pipe
[
0
],
&
c
,
sizeof
(
c
));
err
=
user_read
(
from
->
thread
.
switch_pipe
[
0
],
&
c
,
sizeof
(
c
));
if
(
err
!=
sizeof
(
c
))
if
(
err
!=
sizeof
(
c
))
...
...
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