When I use su to change my UID and then touch a file which does not yet exist, the new file has the correct owner, but the associated group is the one for my original login; it does not reflect the change of GID. I have no difficulty changing the group associated with the new file after the fact...
Function utimensat allows one to adjust the modification and access times of a file down to nanosecond precision. But what function allows me to read those times to nanosecond precision?
I'm sure the answer is staring me in the face, but my face seems not to be functioning properly at the moment.
I searched the FreeBSD forums for any mention of an applicaton which will send sound to a bluetooth pair of headphones. The answer was "not yet", but the most recent such answer that I found was in 2013.
Anythiing newer than that for FreeBSD bluetooth audio?
Bingo. What I'm trying for is something that displays in the style of Norton Commander / Midnight Commander: the desired directory is on the right, its parent directory is on the left, and you can click on file entries in either frame. The format is similar to the output from ls -l. Proof of...
I know about the DirectoryIndex statment ...
DirectoryIndex index.cgi index.html
... and that works fine for me (with index.cgi being a Perl script). But if, for a given directory, neither index.cgi nor index.html exists, I don't want to run libexec/apache24/mod_dir.so; I want to run a...
I have updated the Perl script referenced in my previous post. As part of my testing, I inserted the USB stick containing the image for FreeBSD 10.3-RELEASE, amd64, and that worked fine; it contains only one partition. But then I inserted the USB stick for i386, which has three partitions, of...
The "standard hacking" to which I refer in the previous post reveals a thing or two.
First, don't use an attach or detach statement; use a notify statement.
Second, when you use a notify statement, wblock's idea of looking at $cdev is exactly right. Look at only those events where $type is...
My previous post presents an idea that can work, pretty much. But it's ugly, because timing is involved, and if two USB devices are attached during the same second (which happens sometimes, but not always, at boot), problems arise. I've found a much more straightforward way to show the...
I'm really interested in a general way to access a file system via the USB serial number, and ran some tests using a Kindle, a couple of different brands of thumb drives, and an ancient Nikon camera whose USB storage looks like a SCSIoid drive (sweet).
I placed an attach statement and a detach...
Ok, here we go, for a Kindle at /dev/da0 ...
Script started on Sun May 22 09:27:07 2016
command: diskinfo -v /dev/da0
/dev/da0
512 # sectorsize
3240329216 # mediasize in bytes,(3.0G)
6328768 # mediasize in sectors
0 #...
Yes, /dev/da* is where the new device name will be. But that alone won't help my program distinguish between the one Kindle and the other, because they can be connected to the host in arbitrary order (in time). I really, really need to map between /dev/da* and the serial number, and this will...
Suppose I have two Kindles of the same model (but differing serial numbers, natch). I wish to open the particular Kindle that has a given serial number. The Kindles have been connected to the host in an arbitrary order. How do I open the right Kindle?
Looking at /dev/ugen* (or /dev/usb/*), I...
SirDice and Maelstorm had it right. It's a local issue. I run with ssh-agent sitting on top of the login shell, and that breaks gdb. Since I actually only need that wrinkle for one "user" on my system, I've changed the password file(s) to reflect this; gdb now works just fine for all other...
Unfortunately, "should" isn't "is". As the original post shows, I compile the program and debug it as the same user. To emphasize this, I just now reran the failure, inserting who and ls commands for verification:
home:~/src/main/timesh/tmp$ cat 1.c
#include <stdio.h>
void spain(void)...
Clear and interesting, but the question remains: how does someone who does not have root privileges on a FreeBSD system plant breakpoints in a C program using gdb?
What is, or is not, obfuscation is not always as simple as it seems. I would have thought plain pointer arithmetic:
"s"+(the_count==1)
would have been simple enough to understand, but our discussion makes it clear that the expression is not intuitively obvious to all readers.
The code I showed...
Code which tacks on an "s" when a described quantity is not exactly 1:
#include <stdio.h>
void display_rabbit_count(int the_count)
{
printf(">>>%d rabbit%s<<<\n",
the_count,
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wstring-plus-int"
"s"+(the_count==1)...
I'm starting X as root, as part of system startup. There is no .xinitrc or .xsession. Your response was quite useful, as it prompted me to look closely at exactly what I was doing. The shell script containing the startx command sends standard error to a different file, which revealed to me that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.