Re: how to flush stdin buffer in linux
you may try with __fpurge() On Wed, Jan 9, 2013 at 1:23 AM, Tobias Boege wrote: > On Tue, 08 Jan 2013, Niroj Pokhrel wrote: > > Hi all, > > I tried to use fflush(stdin) in gcc as I used to in other compilers. But > It > > didn't clear my buffer so I am wondering how can I clear the stdin buffer > > in GCC. > > I tried using lseek but got -EPIPE (as tty devices doesn't support lseek > > operation). > > Thanx in advance. > > If it's a tty, you may want to use tcflush(fd, TCIFLUSH); > > Regards, > Tobi > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- Regards, saurabh http://about.me/shandilyasaurabh www.beyondszine.wordpress.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: modules in Initramfs
thanks for your sir, but one more thing i like to know is that if all the modules needed by the kernel are in `initramfs` image then what is the need of the /lib/modules/?? won`t it be redundant?? On Wed, Jun 13, 2012 at 11:18 PM, Mulyadi Santosa wrote: > On Wed, Jun 13, 2012 at 5:33 PM, beyond.hack > wrote: > > hello experts,, > > I am on Fedora 16 and My current kernel is as per the uname -r output > > is 3.1.0-7.fc16.i686.PAE > > > > I am compiling a kernel 3.4.1 and after the compilation the bzimage and > > initramfs are successfully generated.. > > then doing a > > #make install > > is giving error like this:: > > > > sh-4.2# make install > > sh /usr/local/src/linux-3.4.1/arch/x86/boot/install.sh 3.4.1 > > arch/x86/boot/bzImage \ > > System.map "/boot" > > WARNING: Couldn't open directory /lib/modules/3.4.1: No such file or > > directory > > maybe you forgot to do "make modules" followed by "make > modules_install" after generating kernel image? > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
modules in Initramfs
hello experts,, I am on Fedora 16 and My current kernel is as per the uname -r output is 3.1.0-7.fc16.i686.PAE I am compiling a kernel 3.4.1 and after the compilation the bzimage and initramfs are successfully generated.. then doing a #make install is giving error like this:: sh-4.2# make install sh /usr/local/src/linux-3.4.1/arch/x86/boot/install.sh 3.4.1 arch/x86/boot/bzImage \ System.map "/boot" WARNING: Couldn't open directory /lib/modules/3.4.1: No such file or directory FATAL: Could not open /lib/modules/3.4.1/modules.dep.temp for writing: No such file or directory find: `/lib/modules/3.4.1/': No such file or directory F: No modules.builtin.bin and modules.builtin found! E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory find: `/lib/modules/3.4.1/': No such file or directory find: `/lib/modules/3.4.1/': No such file or directory find: `/lib/modules/3.4.1/': No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory E: FATAL: Could not load /lib/modules/3.4.1/modules.dep: No such file or directory sh-4.2# 2.Do all the modules needed by the kernel(specified at the configure time) are built into the initramfs compressed image?? thanks in advance...plz. bear with me if this is a real simple thing...but I am just starting out Regards ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: kernel boot procedure
@Vladimir Murzin--thnx. for the link..really interesting it is.. @Santosh sir, Quoting from: http://www.ibm.com/developerworks/linux/library/l-initrd/index.html *The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available. The initrd is bound to the kernel and loaded as part of the kernel boot procedure. The kernel then mounts this initrd as part of the two-stage boot process to load the modules to make the real file systems available and get at the real root file system.* We were just at BIOS->MBR->bootloader at MBR(GRUB/LILO)- 1.does GRUB/LILO understand/see the filesystems --so that it mounts the initrd image or the kernel image bcz. they both are in /boot(harddisk filesystems) 2.does the kernel mounts initrd as root filesystem??? or the bootloader does this task?? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: kernel boot procedure
So can i say that after the initiallisation that the bios do, the bios code can access all the peripherals completely??? 1..I mean that from the bios code only,, can i acess the harddisk completely..specifically the kernel bcz. If i have accessed the MBR in harddisk, so can i access the remaining part of it too ?? 2..if not. Then is it possible to extend the size of MBR so as to fit the kernel in it(it will initiallise all the peripherals and other things ) thus removing the bootloadr?? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: kernel boot procedure
***when bootloader in bios executes its code, it do POST and other things...then as I read from somewhere kernel does initrd to load some basic modules so as to mount the root file system and then removes the initrd fs. (srry my mistake) ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
kernel boot procedure
hello experts,, I am starting out and heavily *confused* for the part of linux kernel boot:: *(plz. do rectify me at all the wrong places)* when bootloader in bios executes its code, it do POST and other things...then as I read from somewhere kernel does initrd to load some basic modules so as to mount the root file system and then removes itself. 1.how does kernel do initrd as the kernel(vmlinuz) itself is present on the harddisk i mean how the control is transferrred to the kernel(present in hdd) from the bios --at initial point drivers(i mean the protocol to access the harddisk) is not known then how the MBR is accessed ?? 2.can we put the kernel (even though very small part of it) in the bios itself?? Regards saurabh shandilya ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Does Linux process exist information leakage?
Experts.. > As we know that in virtual memory, virtual pages are allocated for a > process..and when that memory is used page fault occurs and then handler > allocates a page frame i.e. Real physical memory..hence our small physical > memory are able to handle bigger processes... > so a information, certainly comes to the "ram" atleast a time... > So can we do something if we have something that can have DMA ??? > I am just guessing!! > Plz do suggest..and correct me if i am wrong!!! > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies