Commit Graph

24562 Commits

Author SHA1 Message Date
Jérôme Duval
a74d92608d style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 11:31:00 +00:00
Jérôme Duval
2ad7bf44d0 Patch from Shinta, this fixes bug #2097. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 11:13:53 +00:00
Stephan Aßmus
03baa14fe9 Style improvements.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 09:53:49 +00:00
Ingo Weinhold
e6f011edbe Disabled BeOS work-arounds for Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 00:57:12 +00:00
Ingo Weinhold
425b1199b0 I don't know, if that makes is less almost-ksh compatible, but whence
(aka which) now returns 1 when it cannot find a specified command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 00:50:21 +00:00
Axel Dörfler
f8a2f7ce58 * attribute dirs shouldn't be locked out either; I've inverted the type check,
so that it now only checks for the type that allow locking.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 22:44:03 +00:00
Ingo Weinhold
3152304e53 Moved creation of the kernel tracing entry for exec_team() to a later
point where the argument vector has already been copied to the kernel.
Before it was crashing when the syscall provided a bad address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 21:42:04 +00:00
Ingo Weinhold
0f75d28cb4 NULL terminate the default argument vector. It is passed to execve().
Fixes #2160.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 21:32:11 +00:00
Ingo Weinhold
977d7846f5 * Unbroke Inode::IsDirectory() again, according to Axel's suggestion.
* Simplified Inode::IsContainer().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 21:17:45 +00:00
Ingo Weinhold
4b8941b10b * Adjusted launch() to accept parameters for the launched program.
* Removed launch_param_1().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 20:52:33 +00:00
Ingo Weinhold
123e47de1b Was using __{BEGIN,END}_DECLS without including <sys/cdefs.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 20:29:47 +00:00
Bruno G. Albuquerque
d81dcabe8e FS gurus, please review.
- get_new_fd() now checks if we are dealing with attributes before deciding to
  bail out on a locked vnode.
- Enabled locking in MailSettings again as it now works.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 19:45:40 +00:00
Bruno G. Albuquerque
7de63c72e6 - Added function launch_param_1() to Bootscript. It launchs servers/programs
that requires a single parameter.
- Added launching mail_daemon to Bootscript. It will only start if the user
  set it to start on boot in the E-mail preferences app.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 16:35:35 +00:00
Bruno G. Albuquerque
68d6c8f169 - Remove directory locking for Chain creation until BNode::Lock() is fixed.
- Creating 2 chains at the same time will result in problems now, but this is
  something unlikelly to happen (although not impossible).
- Added TODOs related to this.
- MDR is usable again inside Haiku and you can actually send emails when
  creating a mixed inbound/outbound account.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 15:58:44 +00:00
Bruno G. Albuquerque
3dd2f0667e Shame on me. The node is actually unlocked in close_fd().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 15:33:35 +00:00
Bruno G. Albuquerque
8ce1d51721 From the BeBook:
Node Locking

Another feature provided by the BNode class is "node locking": Through BNode's
Lock() function you can restrict access to the node. The lock is removed when
Unlock() is called, or when the BNode object is deleted.

There is still something wrong with locking though. For example, it looks like
WriteAttr() fails on the node when we lock it (File Busy) but it should not.
The lock acquirer should be able to call WriteAttr() on it.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 14:50:57 +00:00
François Revol
2bea381578 gcc4 complains about missing proto for strcpy().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 12:47:07 +00:00
François Revol
e65c298c0e Add memrchr for ppc and m68k too. Please don't forget other archs when adding stuff :P
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 12:22:11 +00:00
Axel Dörfler
c4d143146c * fDragBitmap was never initialized, leading to occasional crashes after the
first mouse click.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 11:39:47 +00:00
Stephan Aßmus
d092f4d8df Appearently, PopState() should flush right a way if not in a transaction,
or else the server will keep working with the state and especially a clipping
region which should not be effective anymore. This fixes one problem I could
observe with my test app.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 11:10:08 +00:00
Stephan Aßmus
a49de3208c Reordered methods a bit. SetOrigin() and so on is state related. PopState()
PushState() should be at the top of the state related methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 11:07:51 +00:00
Stephan Aßmus
f62ed7b359 Wrong subfolder in Jamfile
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:59:14 +00:00
Stephan Aßmus
ce158b43fc Enabled the test apps I added.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:53:45 +00:00
Stephan Aßmus
cda5b8808f A test I am currently working on which is supposed to behave a bit like
Firefox. It stores the active clipping region of a view when Draw() is
invoked, and uses that for asynchronous drawing. The test already shows
a couple of problems. When PushState() / PopState() is used, it is not
equivalent to ConstrainClippingRegion(&someRegion) /
ConstrainClippingRegion(NULL). Another problem shows when adding delays
(currently disabled), there should not be any difference, regardless of
how much delay is inserted into the asynchronous drawing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:53:23 +00:00
Stephan Aßmus
b35b070b59 A test I used for debugging Pe's scrollbar problems. (SetSteps() influences
proportion if proportion was never set.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:50:12 +00:00
Stephan Aßmus
d88d001f35 A test I used for checking ConstrainClippingRegion() with regards to states,
scales and origins.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:49:30 +00:00
Stephan Aßmus
0a6ef8179c I have no idea anymore what I was messing with here, but it looks interesting.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:47:55 +00:00
Stephan Aßmus
e7187dd0f0 * Removed no longer needed work around when Showing buttons.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:01:29 +00:00
Stephan Aßmus
ee7cf06d20 * Added link flushing where the change is supposed to happen as soon as
possible on the server side (for example Show() and Hide() need to be
  immediate). But also SetViewColor() and a few others. This fixes the
  bug encountered in Pairs.
* Removed NOTE in DrawAfterChildren(), since it was outdated.
* Corrected a typo in a comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 10:00:37 +00:00
Ingo Weinhold
fd4a010b05 rename() is supposed to fail when the target exists and is not a
directory only if the source is a directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 03:21:14 +00:00
Ingo Weinhold
acb16f5574 * Added missing select notifications on shutdown().
* Notify read/write instead of write/error when disconnecting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 02:56:03 +00:00
Ingo Weinhold
98e94e0a76 For sockets in listening mode the read_avail() apparently has to return
something.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:11:59 +00:00
Ingo Weinhold
210199c5a7 * Resolved {g,s}etrlimit() TODO's, i.e. moved the implementation into
separate functions and made the set errno correctly.
* Added RLIMIT_CORE case. We don't support core dumps, but setting them
  to disabled shouldn't fail anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:08:07 +00:00
Ingo Weinhold
d11e733fee * Allow passing sub vnode ops and publish flags to Inode::Create().
* Implemented create_special_node() hook.
* Fixed Inode::IsContainer()/IsDirectory().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:04:48 +00:00
Ingo Weinhold
0951fcb4a3 vfs_create_special_node() always tried to create the node in "/".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-25 01:02:12 +00:00
Ingo Weinhold
0e42d1bcd8 Our sockaddr_storage is only 128 bytes long. Hence invocations of bind()
or connect() that passed sizeof(sockaddr_un) would always fail. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 22:30:54 +00:00
Ingo Weinhold
a47d979fc2 Added BSD compatibility headers to the image. They are not in the search
paths by default, but I guess we want to keep it that way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:33:08 +00:00
Ingo Weinhold
1669306c8a Use the short way of opening a pty.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:31:45 +00:00
Ingo Weinhold
cc6e7cb347 Added the BSDish openpty().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:30:38 +00:00
Ingo Weinhold
fb913b19be Added POSIX functions posix_openpt(), grantpt(), ptsname(), and
unlockpt(), which provide a portable way of opening a pty.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:29:13 +00:00
Ingo Weinhold
06b7c7ffe2 * Set reasonable terminal flag defaults. This makes telnetd fully usable
again.
* Publish /dev/ptmx. Opening it will open a fresh pty master. In
  principle /dev/pt/ is obsolete now, but I guess we keep it around for
  compatibility with BeOS. Though there shouldn't be many applications
  opening a pty, that we might be interested in...
* New ioctls B_IOCTL_GET_TTY_INDEX (returns the tty index) and
  B_IOCTL_GRANT_TTY (grants tty slave access rights).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:26:35 +00:00
Ingo Weinhold
719f971dea Controlling terminal related changes:
* It is possible to acquire a tty that is already open, iff it is not a
  controlling terminal yet and the process is a session leader.
* Also set the terminal process group when acquiring a controlling
  terminal.

telnetd/login and sshd are a lot happier now (and so am I :-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 21:16:57 +00:00
Ingo Weinhold
e225a906d2 With my recent changes release_sem_etc() accidentally lost the
cleverness to reschedule only, if it actually unblocked another thread.
Should have been the reason for #2152 (overall slowdown).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 20:04:43 +00:00
Axel Dörfler
2909d9dc26 * Factored a delete_notification() that is now used in three places.
* remove_transaction_listeners() was checking the events_pending field without
  holding the sNotificatonLock - that should have been harmless (as we're in the
  middle of deleting the transaction), but it now looks better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:23:10 +00:00
Ingo Weinhold
dcc3839464 Check the shadow password under Haiku, when available. ftpd works again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:07:59 +00:00
Ingo Weinhold
d1dc42cc73 "/bin/bash" is a valid shell, too. ftpd doesn't allow anyone to login,
who has a shell not returned by getusershell().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 16:07:02 +00:00
Ingo Weinhold
9afa8bc573 Small test that repeatedly connects to a server. Under Haiku after
several iterations the connect()s start to fail -- first occasionally,
later quite often.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 15:18:05 +00:00
Ingo Weinhold
2838616b17 Translate connect()s to INADDR_ANY to INADDR_LOOPBACK. Not sure, if that
is required, but Linux seems to do it. It also allows us to create
AF_INET socketpair()s -- not really needed, but probably nice for
testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 14:19:58 +00:00
Axel Dörfler
701d196668 * Inode::_GrowStream() did not make the double indirect block writable before
adding a block to its array. This could cause all kinds of trouble, and
  fixes at least a part of #2148.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 11:28:41 +00:00
Axel Dörfler
89eb861a3e * Large cleanup. Removed inconsistent usage of errno in instantiate_object();
instead, it will now use the image_id parameter to store errors in.
* find_instantiation_func() and validate_instantiation() will no longer
  overwrite errno with B_OK.
* Made private functions static, and moved them to the top.
* If the class name starts with '_', it will now try to add a BPrivate namespace
  in case it could not find the class. This should help with the compatibility
  issues Shinta reported (also part of ticket #2086).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-24 09:56:03 +00:00