Displaying 12 results from an estimated 12 matches for "name_to_dev_t".
Did you mean:
name_to_dev
2005 Jan 05
0
[PATCH] kinit/do_mounts.c:name_to_dev_t()
kinit/do_mounts.c:name_to_dev_t() has an inverted logic problem and also
doesn't return the correct value for "/dev/nfs".
--- klibc-0.194/kinit/do_mounts.c.orig 2005-01-05 01:59:29.250868616 -0700
+++ klibc-0.194/kinit/do_mounts.c 2005-01-05 02:34:30.486432256 -0700
@@ -103,7 +103,7 @@
if ( name[0] == '/'...
2006 Jul 11
0
[rfc] standalone kinit/resume
...e(resume_file);
+ fprintf(stderr, "Usage: %s /dev/<resumedevice>\n", progname);
+ exit(1);
}
-int resume(const char *resume_file)
+int main(int argc, char *argv[], char *envp[])
{
- char device_string[64];
- int powerfd = -1;
- dev_t resume_device;
- int len;
-
- resume_device = name_to_dev_t(resume_file);
-
- if (major(resume_device) == 0) {
- fprintf(stderr, "Invalid resume device: %s\n", resume_file);
- goto failure;
- }
-
- if ((powerfd = open("/sys/power/resume", O_WRONLY)) < 0)
- goto fail_r;
-
- len = snprintf(device_string, sizeof device_string, "%...
2018 Mar 30
0
[PATCH] resume: Use the kernel API from 4.17 for setting resume offset
...r/kinit/resume/resumelib.c
+++ b/usr/kinit/resume/resumelib.c
@@ -45,7 +45,9 @@ int resume(const char *resume_file, unsigned long long resume_offset)
{
dev_t resume_device;
int powerfd = -1;
+ int offsetfd = -1;
char device_string[64];
+ char offset_string[64];
int len;
resume_device = name_to_dev_t(resume_file);
@@ -55,13 +57,23 @@ int resume(const char *resume_file, unsigned long long resume_offset)
goto failure;
}
+ /* Write the offset, this won't work on less than 4.17 */
+ offsetfd = open("/sys/power/resume_offset", O_WRONLY);
+ if (offsetfd > 0) {
+ len = snprint...
2003 Nov 21
1
cpio archiving unpacking problem
Hello,
There seems to be problem in the cpio unpack in the kernel in
initramfs. I have an empty "/sys" directory in my cpio archive, but it
never shows up in my extracted initramfs.
I've confirmed that extracting the archive again with cpio results in a
correct tree, but it doesn't appear on boot when extracted by the
kernel.
Any ideas? I poked a bit, but I haven't
2019 Jan 20
0
[klibc:master] resume: Write resume_offset attribute
...r/kinit/resume/resumelib.c
@@ -44,8 +44,8 @@ int do_resume(int argc, char *argv[])
int resume(const char *resume_file, unsigned long long resume_offset)
{
dev_t resume_device;
- int powerfd = -1;
- char device_string[64];
+ int attr_fd = -1;
+ char attr_value[64];
int len;
resume_device = name_to_dev_t(resume_file);
@@ -55,30 +55,50 @@ int resume(const char *resume_file, unsigned long long resume_offset)
goto failure;
}
- if ((powerfd = open("/sys/power/resume", O_WRONLY)) < 0)
- goto fail_r;
+ if ((attr_fd = open("/sys/power/resume_offset", O_WRONLY)) < 0)
+ go...
2006 May 19
1
pxelinux cmdline preparation for klibc kinit
.../init
cmd-arg 1: console=ttyS0,115200n81
cmd-arg 2: root=/dev/nfs
cmd-arg 3: ip=::::soekris:eth0
cmd-arg 4: panic=5
cmd-arg 5:
cmd-arg 6: BOOT_IMAGE=vmlinuz-2.6.17-rc4-mm1-sk
Running ipconfig
IP-Config: argc == 2
argv[1]: '-n'
IP-Config: no devices to configure
kinit: do_mounts
kinit: name_to_dev_t(/dev/nfs) = dev(0,255)
kinit: root_dev = dev(0,255)
Ro[ 25.030001] Kernel panic - not syncing: Attempted to kill init!
ot-NFS: no serve[ 25.037537] r defined
<0>Rebooting in 5 seconds..
I think this qualifies as a bug; its not what folks expect.
A docpatch WITH LARGE LETTERS would rect...
2007 Jul 24
1
Custom kinit to find device by "label"
I need to reliably boot a server from a USB device. Since USB
device ordering can be unpredictable, I wrote a simple
early-userspace "init" program to find the root FS on the correct USB
device & partition. I have "labeled" the root ext2 FS on the USB
drive, and the program searches for the label by examining the bytes
at a specific offset from the beginning of the
2012 Mar 08
3
[PATCH 0/3] kinit: Allow mount options
This patch series allows user-specified mount commands to be
sent in via kernel command line ("kinit_mount=...") or via
an embedded /etc/fstab file.
The first patch is a cleanup of a patch sent last November
by San Mehat (http://web.archiveorange.com/archive/v/EazJNBMORV2U7E0coh5h);
the next two are small improvements or bug fixes.
2010 Mar 02
17
[PATCH 00/16] External building, update for 2.6.33 and multiple root devices.
The following patchset implements 3 seperate series of changes.
External Building
=================
Patches 1 through 8 enable to use of klibc's build system while leaving the src
tree pristine (and potentially read only). Specifically:
- srctree=<Sources for klibc>
- objtree=<Ouput directory for klibc>
- KLIBCKERNELSRC=<Kernel sources>
- KLIBCKERNELOBJ=<Kernel
2009 Aug 24
18
Current 2.6.3x kernel and patches for Ubuntu 9.04?
Are these the current functional procedures for dropping a dom0 on a
jaunty 64 bit server?
xen-tools:
http://bderzhavets.wordpress.com/2009/08/14/attempt-of-prevu-xen-3-4-1-hypervisor-on-ubuntu-jaunty-server-64-bit/
kernel:
http://bderzhavets.wordpress.com/2009/07/07/building-xenified-2-6-30-1-kernel-via-xen-patches-2-6-30-2-tar-bz2/
Regarding the patches used in the above procedure from here:
2003 May 22
0
[PATCH 2.5.69 2/3] Remove NFS root support from the kernel
...;
- }
-#endif
#ifdef CONFIG_BLK_DEV_FD
if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
/* rd_doload is 2 for a dual initrd/ramload setup */
@@ -352,10 +330,6 @@
{
int is_floppy;
- mount_devfs();
-
- md_run_setup();
-
if (saved_root_name[0]) {
root_device_name = saved_root_name;
ROOT_DEV = name_to_dev_t(root_device_name);
@@ -363,6 +337,13 @@
root_device_name += 5;
}
+ if (ROOT_DEV == Root_InitRamFS)
+ goto done;
+
+ mount_devfs();
+
+ md_run_setup();
+
is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
/* This has to be before mounting root, because even readonly mount of reiserfs would...
2006 Jun 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In
particular, the patchset has been reorganized so as not to break
git-bisect.
Additionally, this updates the patch base to 2.6.17-git12
(d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main
difference on the klibc side is removal of obsolete code.
This is also available as a git tree at: