Re: Files in C.
Greg, i am going to keep in mind your words. In fact I expect to guide me for more than an opinion. Hopefully they accept occasionally some my code written in C so that they help me to perfect it and i hope be not an inconvenience. PD. Any objection with the previous thing tell it to me please. -- ConcepciĆ³n, Chile. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mergemaster improvement (auto-update for not modified files)
The technical reasons are very simple. If a new system call is created, and programs use that new system call, then if you do an installworld before you boot the kernel, that can result in binaries not working. This has happened with important ones like /bin/sh in the past. In addition, if you aren't running single user, many different races exist in the installation process that can result in bad behavior. There are also potential problems with symbols in there's a large jump between the revisions being updated. Usually you can get away with it, but if you want to be safe, you must do the install in single user. Usually, however, has lead in the past to problems, which is why the project recommendations are conservative. A auto-scripted install directly run from rc.d in single-user mode would cover both requirements - I seem to recall that Solaris had something like it at a point. Somewhat along the lines of nextboot would be nice. How do you know where to get the sources from? What environment to build them from? However, if you could cover those issues, I'd love to see a script to deal. Maybe you could implement something that would be robust enough for the project to recommend... What I do sometimes is to (in multiuser mode) make a copy of /etc to say /etc.new, the run mergmaster and stop it after it created /var/tmp/temproot and then rename the etc inside it also to etc.new and then run mergemaster -r. Then go to single user mode and rename /etc.new to /etc and reboot. This still does have all the work, but it does minimize the downtime in single user mode. John -- John Hay -- [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Pci Question
Hi Im trying to write a userland program that writes to the IOPORT BAR's of a pci card. I can find the card and all that fine. But im a bit lost on exactly what address the IOPORT BAR's would be then? Im using the /dev/pci and pci(4) functions to find the card. Ive seen in the linux version of those code, that they take the base_address's and then ~0x03 them, and use that value for reading and writing with inb_l and outb_l. Ive tried using that on FreeBSD, but with outl and inl, as well as writel and readl, but I keep getting Bus error. Is there perhaps something that I am missing or forgetting, also im running the program as root. If anyone has any suggestions, they would be most welcome. Thanks /Cole ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Pci Question
Err, sorry. I meant the linux version of this is using outl_p to communicate with the device, and write the values. /Cole - Original Message - From: Cole [EMAIL PROTECTED] To: freebsd-hackers@freebsd.org Sent: Thursday, May 05, 2005 12:04 PM Subject: Pci Question Hi Im trying to write a userland program that writes to the IOPORT BAR's of a pci card. I can find the card and all that fine. But im a bit lost on exactly what address the IOPORT BAR's would be then? Im using the /dev/pci and pci(4) functions to find the card. Ive seen in the linux version of those code, that they take the base_address's and then ~0x03 them, and use that value for reading and writing with inb_l and outb_l. Ive tried using that on FreeBSD, but with outl and inl, as well as writel and readl, but I keep getting Bus error. Is there perhaps something that I am missing or forgetting, also im running the program as root. If anyone has any suggestions, they would be most welcome. Thanks /Cole ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Determining PCI-X speed from FreeBSD?
Is there anyway to determine what speed a PCI-X card is running at from FreeBSD? Steve This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
req: New feature to rm? Remove file by the inode number
I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. Cheers, Erik. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
On Thu, May 05, 2005 at 02:19:41PM +0300, Erik Udo wrote: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. find(1) with -inum and -delete would do the trick. Tim ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
On Thu, May 05, 2005 at 02:19:41PM +0300, Erik Udo wrote.. I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. If you want do to it the hard way: clri(8) :-) -- Wilko Bulte [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. I think the -inum option of the find(1) utility can do the trick. -- -jpeg. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
Wilko Bulte wrote: On Thu, May 05, 2005 at 02:19:41PM +0300, Erik Udo wrote.. I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. If you want do to it the hard way: clri(8) :-) Thanks! I'll use clri for this. It would still be a nice feature in rm, after all, i dont think it's that hard to make. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
Julien Gabel wrote: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. I think the -inum option of the find(1) utility can do the trick. After trying clri, maybe find(1) is a better way :). I can imagine what would happen when i would use clri on wrong slice :) ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: SSE in kernel?
Kris Kennaway wrote: This question is asked quite often..please see the mailing list archives for discussion. I've searched -hackers and -current lists for sse and sse kernel search strings without explicit findings. From what I can discern from various discussions, the answer is probably not? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
Julien Gabel wrote: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. I think the -inum option of the find(1) utility can do the trick. After trying clri, maybe find(1) is a better way :). I can imagine what would happen when i would use clri on wrong slice :) i haven't seen/used clri in years (maybe decades), but if memory doesn't fail, clri just zeroes the inode, the blocks are not returned to the freelist! and if it's a directory things can get nasty. my .5$ danny ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Pci Question
Nevermind, I figured it out and got it working. Thanks - Original Message - From: Cole [EMAIL PROTECTED] To: freebsd-hackers@freebsd.org Sent: Thursday, May 05, 2005 12:39 PM Subject: Re: Pci Question Err, sorry. I meant the linux version of this is using outl_p to communicate with the device, and write the values. /Cole - Original Message - From: Cole [EMAIL PROTECTED] To: freebsd-hackers@freebsd.org Sent: Thursday, May 05, 2005 12:04 PM Subject: Pci Question Hi Im trying to write a userland program that writes to the IOPORT BAR's of a pci card. I can find the card and all that fine. But im a bit lost on exactly what address the IOPORT BAR's would be then? Im using the /dev/pci and pci(4) functions to find the card. Ive seen in the linux version of those code, that they take the base_address's and then ~0x03 them, and use that value for reading and writing with inb_l and outb_l. Ive tried using that on FreeBSD, but with outl and inl, as well as writel and readl, but I keep getting Bus error. Is there perhaps something that I am missing or forgetting, also im running the program as root. If anyone has any suggestions, they would be most welcome. Thanks /Cole ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
On Thu, May 05, 2005 at 03:24:25PM +0300, Danny Braniss wrote.. Julien Gabel wrote: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. I think the -inum option of the find(1) utility can do the trick. After trying clri, maybe find(1) is a better way :). I can imagine what would happen when i would use clri on wrong slice :) i haven't seen/used clri in years (maybe decades), but if memory doesn't fail, clri just zeroes the inode, the blocks are not returned to the freelist! and if it's a directory things can get nasty. man clri(8) tells you all about that.. -- Wilko Bulte [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
Erik Udo writes: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. How about rm -i ./*? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
On Thu, May 05, 2005 at 02:47:55PM +0300, Erik Udo wrote: Wilko Bulte wrote: On Thu, May 05, 2005 at 02:19:41PM +0300, Erik Udo wrote.. I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. If you want do to it the hard way: clri(8) :-) Thanks! I'll use clri for this. It would still be a nice feature in rm, after all, i dont think it's that hard to make. Way overkill. find . -mindepth 1 -maxdepth 1 -inum inode -- Brian Fundakowski Feldman \'[ FreeBSD ]''\ [EMAIL PROTECTED] \ The Power to Serve! \ Opinions expressed are my own. \,,\ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Pci Question
Open /dev/io to use out*/in* functions. Warner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
A couple of observations: 1) Implicit in most people's answers is the fact that a single inode can have many directory entries. That's why find is used. That's also why the solution below won't work, as it doesn't check the entire file system (nor would you want to answer y/n for all those files :) 2) The same inode number can exist for multiple files in a system. This occurs if multiple file systems exist. So, if you use find to achieve the desired effect, be very sure that you run it from the root of the target file system and that you tell it not to traverse onto other file systems. If you run it from the root directory, you're very likely to delete one or more files you didn't mean to delete. Point 2, likely as not, might explain why there's no simple mechanism for doing this from rm. At the very least you'd have to specify the file system you're referring to, and many plain users couldn't do that safely. Those that can are probably able to use find anyway. Cheers, Simon --- Raymond Wiker [EMAIL PROTECTED] wrote: Erik Udo writes: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. How about rm -i ./*? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
--- Simon Roberts [EMAIL PROTECTED] wrote: A couple of observations: [snip] [snip] Point 2, likely as not, might explain why there's no simple mechanism for doing this from rm. At the very least you'd have to specify the file system you're referring to, and many plain users couldn't do that safely. Those that can are probably able to use find anyway. A (device no, inode no) can uniquely identify a file -but then it requires the same amt of traversals (from the root directory's inode) that any other utility does. Im not sure rm can optimize anything that a find .. -exec rm {} \; would. Cheers, Simon --- Raymond Wiker [EMAIL PROTECTED] wrote: Erik Udo writes: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. How about rm -i ./*? The POSIX std requires -i to be used for 'interactive' (and even if it didn't that is already the case on most unix systems). regards -kamal ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] Kamal R. Prasad UNIX systems consultant [EMAIL PROTECTED] In theory, there is no difference between theory and practice. In practice, there is:-). Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
Kamal R. Prasad writes: --- Raymond Wiker [EMAIL PROTECTED] wrote: Erik Udo writes: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) I bet there is a way to remove those files, but only third party programs came to my mind. How about rm -i ./*? The POSIX std requires -i to be used for 'interactive' (and even if it didn't that is already the case on most unix systems). That's exactly the way I meant this to be used... if you use the command rm -i ./* you will be asked for each file whether you want to remove it (except for files beginning with ., of course). I don't see this as more cumbersome than using ls -i to get a list of inodes, and then using clri or whatever to remove the inode; which operation is probably the wrong solution anyway, as there may be other directory entries that point to the same inode, and which should be allowed to do so even after the unwanted directory entries have been removed. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
Point 2, likely as not, might explain why there's no simple mechanism for doing this from rm. At the very least you'd have to specify the file system you're referring to, and many plain users couldn't do that safely. Those that can are probably able to use find anyway. A (device no, inode no) can uniquely identify a file -but then it requires the same amt of traversals (from the root directory's inode) that any other utility does. Im not sure rm can optimize anything that a find .. -exec rm {} \; would. Or find [...] -print | xargs \rm to bypass some problem with a very long list of files to delete. -- -jpeg. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
My point of view is if you add inode removing option to the rm you'll have to add en extra parameter, that is on which *filesystem*. For example, rm -x 2 /var, i am supposing -x as the option for removing inodes is removing inode number 2 on file system /var So the pattern seems to be a little confusing since, at a first glance, it looks like you are removing /var directory. Some dummy users may or may not be confused. Because of general purpose of rm is basically removing directory entries, Adding an extra inode option and specifying a pattern as above is a little misaiming of rm. No necessasity. We'd better let third programs achieve such a will. clri and find will be sufficient. Sincerely. P.S: What i've written above is not related to the replied message. I only replied to be in the thread. On Thursday 05 May 2005 16:55, Julien Gabel wrote: Point 2, likely as not, might explain why there's no simple mechanism for doing this from rm. At the very least you'd have to specify the file system you're referring to, and many plain users couldn't do that safely. Those that can are probably able to use find anyway. A (device no, inode no) can uniquely identify a file -but then it requires the same amt of traversals (from the root directory's inode) that any other utility does. Im not sure rm can optimize anything that a find .. -exec rm {} \; would. Or find [...] -print | xargs \rm to bypass some problem with a very long list of files to delete. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
At 2:19 PM +0300 5/5/05, Erik Udo wrote: I couldn't find a way to remove files that had scandic/non-printable letters, then i remembered ls showed inode number of the file. Is it possible to remove the file by the inode number? It would be a useful feature :) It would be a bad feature, at least for the problem you are trying to solve. You are trying to remove one specific filename from one specific directory. It is possible to link multiple filenames to the exact same file (inode). If a file has multiple links to it, then you would want to remove only the filename you're looking at, and not all filenames in the filesystem which might have the same inode. Other solutions, with 'find' or 'rm -i ./*', are more correct for the situation you are looking at. Note that if a file only has *some* unprintable characters, and also has some standard characters, then you can use pattern-matching to reduce how many fines would be matched by 'rm -i'. Something like: rm -i ./*blah* I have been in similar situations to what you're describing, and I've never had to do more than pick a reasonable filename pattern and combine it with -i (-i for interactive, so it prompts you for each file before removing it). -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
A bit confused with the sched_4bsd.c code
Hello, First of all, I am not sure if this is the correct mail list with posting this mail. I apologize for that.. Second, I may seem to have little C knowledge, though I am using C for about 5 years and plus. Let's start with the question. I am digging the FreeBSD-5.3 kernel codes. Watson's Cross Reference is really helpful. In the schedcpu(void) function there is an assignment like ke = td-td_kse; on line 438 (see: http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438;). When I look at the thread structure at sys/proc.h, I could not see such an entry td_kse in the thread structure. How has this structure been extended or this entry added to the thread structure? Although the kernel codes seem to be simply understandable, there still lies some difficulties to understand for an average C programmer: magic stuff done by professionals. :) Anyway, any help really will be appreciated... Thanks. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A bit confused with the sched_4bsd.c code
Halil Demirezen wrote: Hello, First of all, I am not sure if this is the correct mail list with posting this mail. I apologize for that.. Second, I may seem to have little C knowledge, though I am using C for about 5 years and plus. Let's start with the question. I am digging the FreeBSD-5.3 kernel codes. Watson's Cross Reference is really helpful. In the schedcpu(void) function there is an assignment like ke = td-td_kse; on line 438 (see: http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438;). When I look at the thread structure at sys/proc.h, I could not see such an entry td_kse in the thread structure. How has this structure been extended or this entry added to the thread structure? Although the kernel codes seem to be simply understandable, there still lies some difficulties to understand for an average C programmer: magic stuff done by professionals. :) Anyway, any help really will be appreciated... Thanks. Look near the top of the file for: #define td_kse td_sched That makes td-td_kse resolve to td-td_sched. Now, there is other magic associated with td_sched in each scheduler source file, but that's different matter =-) Scitt ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A bit confused with the sched_4bsd.c code
On Thursday 05 May 2005 21:48, Scott Long wrote: #define td_kse td_sched Yes that is also a magical case since in the sys/proc.h file, only a single definition lies; struct td_sched; I could not understand anything from this. There is not body of the structure. Shouldn't there be a definitive structure for td_sched? if there is i really could not find the body :) hmm, what kind of a different matter is this ? :-) Halil ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A bit confused with the sched_4bsd.c code
Halil Demirezen wrote: On Thursday 05 May 2005 21:48, Scott Long wrote: #define td_kse td_sched Yes that is also a magical case since in the sys/proc.h file, only a single definition lies; struct td_sched; That's called a forward declaration. I could not understand anything from this. There is not body of the structure. Shouldn't there be a definitive structure for td_sched? if there is i really could not find the body :) hmm, what kind of a different matter is this ? :-) td_sched is defined within each scheduler source file. Since the schedulers are mutually exclusive, they don't collide. Scott ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: req: New feature to rm? Remove file by the inode number
Julien Gabel wrote this message on Thu, May 05, 2005 at 18:55 +0200: Point 2, likely as not, might explain why there's no simple mechanism for doing this from rm. At the very least you'd have to specify the file system you're referring to, and many plain users couldn't do that safely. Those that can are probably able to use find anyway. A (device no, inode no) can uniquely identify a file -but then it requires the same amt of traversals (from the root directory's inode) that any other utility does. Im not sure rm can optimize anything that a find .. -exec rm {} \; would. Or find [...] -print | xargs \rm to bypass some problem with a very long list of files to delete. Please make that: find [...] -print0 | xargs -0 rm otherwise whitespace characters can cause problems... of course find does have the -delete option which makes such mangling unnecessary.. -- John-Mark Gurney Voice: +1 415 225 5579 All that I will do, has been done, All that I have, has not. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A bit confused with the sched_4bsd.c code
Scott Long wrote: Halil Demirezen wrote: Hello, First of all, I am not sure if this is the correct mail list with posting this mail. I apologize for that.. Second, I may seem to have little C knowledge, though I am using C for about 5 years and plus. Let's start with the question. I am digging the FreeBSD-5.3 kernel codes. Watson's Cross Reference is really helpful. In the schedcpu(void) function there is an assignment like ke = td-td_kse; on line 438 (see: http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438;). When I look at the thread structure at sys/proc.h, I could not see such an entry td_kse in the thread structure. How has this structure been extended or this entry added to the thread structure? Although the kernel codes seem to be simply understandable, there still lies some difficulties to understand for an average C programmer: magic stuff done by professionals. :) Anyway, any help really will be appreciated... Thanks. Look near the top of the file for: #define td_kse td_sched That makes td-td_kse resolve to td-td_sched. Now, there is other magic associated with td_sched in each scheduler source file, but that's different matter =-) this is a temporary (for a coupe of years) :-) thing as teh two structures were merged, but I didn't want to change all the files references because that would make all the diffs to larde and obscure teh real differences. at some point in teh future I will commit a change that cleans this up but doesn't change anything else. Scitt ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A bit confused with the sched_4bsd.c code
Halil Demirezen wrote: Hello, First of all, I am not sure if this is the correct mail list with posting this mail. I apologize for that.. Second, I may seem to have little C knowledge, though I am using C for about 5 years and plus. Let's start with the question. I am digging the FreeBSD-5.3 kernel codes. Watson's Cross Reference is really helpful. In the schedcpu(void) function there is an assignment like ke = td-td_kse; on line 438 (see: http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438;). When I look at the thread structure at sys/proc.h, I could not see such an entry td_kse in the thread structure. How has this structure been extended or this entry added to the thread structure? Although the kernel codes seem to be simply understandable, there still lies some difficulties to understand for an average C programmer: magic stuff done by professionals. :) Anyway, any help really will be appreciated... originally there were 2 structures the kse and the td_sched They were merged but the code was kept teh same so that edits would be not 'flooded' in the diffs. places that used to refer to ke-ke_xxx still do and places that used to refer to td-td_sched-tds_xxx still do but they are now the same thing. Thanks. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A bit confused with the sched_4bsd.c code
On Thu, 2005-05-05 at 20:10, Halil Demirezen wrote: Hello, First of all, I am not sure if this is the correct mail list with posting this mail. I apologize for that.. Second, I may seem to have little C knowledge, though I am using C for about 5 years and plus. Let's start with the question. I am digging the FreeBSD-5.3 kernel codes. Watson's Cross Reference is really helpful. In the schedcpu(void) function there is an assignment like ke = td-td_kse; on line 438 (see: http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438;). When I look at the thread structure at sys/proc.h, I could not see such an entry td_kse in the thread structure. How has this structure been extended or this entry added to the thread structure? Although the kernel codes seem to be simply understandable, there still lies some difficulties to understand for an average C programmer: magic stuff done by professionals. :) Anyway, any help really will be appreciated... Thanks. #define td_kse td_sched http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L95 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]