Skip to content
Advertisement

Tag: c++

Linux kernel module compiling

I try to compile simple linux kernel module: My makefile: Now i haven’t errors in my .c file. But when i try make in terminal: make: Nothing to be done for `all’. What’s wrong? Thank you. Answer The default command in your makefile is That instructs make to cd to /lib/modules/$(KVERSION)/build and run In turn, that makefile is not finding

How to obtain total available disk space in Posix systems?

I’m writing a cross-platform application, and I need the total available disk space. For posix systems (Linux and Macos) I’m using statvfs. I created this C++ method: Unfortunately I’m getting quite strange values I can’t understand. For instance: f_blocks = 73242188 f_bsize = 1048576 f_bfree = 50393643 … Are those values in bits, bytes or anything else? I read here

How to view symbols in object files?

How can I view symbols in a .o file? nm does not work for me. I use g++/linux. Answer Instead of nm, you can use the powerful objdump. See the man page for details. Try objdump -t myfile or objdump -T myfile. With the -C flag you can also demangle C++ names, like nm does.

System Time change detection on linux

I was reading about the licensing of software and one question that came to my mind is that “how software detect the change in system time and block themselves if someone changes system time?”. Since there is no other reference available(provided we don’t have internet connection, otherwise we can use time servers as reference), how such software manages to do

Advertisement