Search results

  1. Bill Evans at Mariposa

    Solved configuration question: persistent gid after su

    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...
  2. Bill Evans at Mariposa

    Solved the read side of utimensat

    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.
  3. Bill Evans at Mariposa

    2016 A.D.: bluetooth audio yet?

    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?
  4. Bill Evans at Mariposa

    apache config: like mod_dir.so, but a Perl script

    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...
  5. Bill Evans at Mariposa

    apache config: like mod_dir.so, but a Perl script

    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...
  6. Bill Evans at Mariposa

    Other opening usb device by serial number

    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...
  7. Bill Evans at Mariposa

    Other opening usb device by serial number

    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...
  8. Bill Evans at Mariposa

    Other opening usb device by serial number

    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...
  9. Bill Evans at Mariposa

    Other opening usb device by serial number

    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...
  10. Bill Evans at Mariposa

    Other opening usb device by serial number

    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 #...
  11. Bill Evans at Mariposa

    Other opening usb device by serial number

    Oh, wait. I read that too fast. Ignore my previous post until I can take a deep breath and go at it again. Sorry.
  12. Bill Evans at Mariposa

    Other opening usb device by serial number

    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...
  13. Bill Evans at Mariposa

    Other opening usb device by serial number

    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...
  14. Bill Evans at Mariposa

    C gdb seems to need to run as root

    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...
  15. Bill Evans at Mariposa

    C gdb seems to need to run as root

    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)...
  16. Bill Evans at Mariposa

    C gdb seems to need to run as root

    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?
  17. Bill Evans at Mariposa

    C gdb seems to need to run as root

    When I'm running as root, using gdb (GNU gdb version 6.1.1 [FreeBSD]) is straightforward. Example: root:/u/home/tmp# cat 1.c #include <stdio.h> void spain(void) {printf("got to spain\n");} int main(void) { spain(); return 0; } root:/u/home/tmp# cc -g -Wall -Werror 1.c -o 1 root:/u/home/tmp# 1...
  18. Bill Evans at Mariposa

    Solved starting at a specified point in a constant string

    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...
  19. Bill Evans at Mariposa

    Solved starting at a specified point in a constant string

    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)...
  20. Bill Evans at Mariposa

    Solved device /dev/ums0 already opened

    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...
Back
Top