* When the target is a symlink, it is tried to be resolved before making
the decision what to do.
* If the (resolved) target is a file and the source is a file, we don't
fail anymore, if `-f' wasn't specified. We truncate the target file
instead and copy the source data into it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11683 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also removed team::user_env_base: environment variables are now changed on the app's heap.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11672 a95241bf-73f2-0310-859d-f6bbb57e9c96
malloc() currently cannot be used in initialize_before() in libroot.so,
and therefore a _after() call has been added for this.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11670 a95241bf-73f2-0310-859d-f6bbb57e9c96
made it thread-safe, although this is not required by POSIX.
Implemented unsetenv(), improved putenv().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11668 a95241bf-73f2-0310-859d-f6bbb57e9c96
added macros to use our standard posix call when possible instead of prefixed versions
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11651 a95241bf-73f2-0310-859d-f6bbb57e9c96
generic files are used by archs with source search feature of Jam when no specialized version exists
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11643 a95241bf-73f2-0310-859d-f6bbb57e9c96
Jonas Sundstrom. I've worked over it so that it complies to our style
guide, and also has a better error handling/reporting (ie. errors are
now always printed and redirected to stderr).
Also changed command options - it's now using getopt_long(), and not
that weak mechanism it used before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11640 a95241bf-73f2-0310-859d-f6bbb57e9c96
team IDs are now equivalent in Haiku, we don't need to print both.
Also, team paths are now truncated to fit into the list to give a better
visual appearance.
Added two options to turn off truncating and to show the team name
(instead of full path) only.
Applied our style guide, replaced C++ streams with nicer stdio stuff
(formatted output is not that nice in C++).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11638 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed a couple dozens of drawing problems (like multiple channels not drawn in the right place) and implemented the needed scripting functionalities into MessageReceived().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11637 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added some musings about what is missing, when a debugger is removed and
how _user_wait_for_debugger() shall be supported.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11636 a95241bf-73f2-0310-859d-f6bbb57e9c96
threadID parameter to spawn_kernel_thread_etc(). It's now possible to
set the ID of a new thread. Used in team.c to make team ID and the ID of
the main thread equal.
Fascinatingly the two added functions prompt my compiler to issue
`missing prototype' warnings, although those are obviously there. It would
be nice if someone could solve that riddle.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11621 a95241bf-73f2-0310-859d-f6bbb57e9c96
be used by our R5 mkbfs replacement for now, until someone replaced that
boot loader code :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11616 a95241bf-73f2-0310-859d-f6bbb57e9c96
1. StuffValues returned B_BAD_INDEX for legal values. Fixed.
2. SetAllValue was needed. Implemented.
3. The constructor used memset() to initialize an array of int32 to 100. YUCK! That's a novice mistake (and that's my fault, obviously). Fixed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11610 a95241bf-73f2-0310-859d-f6bbb57e9c96
the platform independent code out of fs_shell_command_beos.cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11600 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Make return value of implementations of Directory::GetNextEntry()
match the base class version.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11599 a95241bf-73f2-0310-859d-f6bbb57e9c96
they return the respective error codes.
* Fixed the open mode conversion function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11597 a95241bf-73f2-0310-859d-f6bbb57e9c96
switch to Axel's hack to just redefine the critical functions via macro
definition in the Jamfile.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11589 a95241bf-73f2-0310-859d-f6bbb57e9c96
ones.
* Added listattr command.
* Added cd command. It can change the CWD of the emulated as well as of
the host OS (prefix `:').
* Changed do_dir() to print symlinks with their target.
* Rewrote the rm command. It now support the options -r and -f
and multiple files.
* Rewrote the symlink command (and renamed it to link, alias ln). It now
supports creating hardlinks and understands the options -s and -f.
* Added command xcp, with support for options -r, -f, -d, and pretty
close approximation of the shell command cp, save for the fact, that it
copies attributes and can freely copy in the emulated and host OS
(and between them, of course; prefix `:').
Now it should be possible to change makehdimage to use a scripted
bfs_shell instead of UserlandFS to build a HD image.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11587 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added sys_stat_attr().
* Added sys_open_attr_dir(). Extended the directory functions to be able
to deal with attribute directories.
* Init the current directory, so we can use it (the support is there
already).
* Use our open modes instead of the platform ones.
* Added O_NOTRAVERSE support to sys_open().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11586 a95241bf-73f2-0310-859d-f6bbb57e9c96
non-POSIX functions that we have disabled from the build. Not sure if
we really want to change that (ie making those functions public).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11579 a95241bf-73f2-0310-859d-f6bbb57e9c96
it compile (some recent change in the Jumrules must have revealed these
build errors).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11576 a95241bf-73f2-0310-859d-f6bbb57e9c96
the bfs_shell related files:
* Fixed a couple of `friend without struct/class' errors gcc 3
complains about.
* Several adjustments do make the FS add-on build in a BeOS-like
environment. E.g. the fs_shell header "myfs.h" is not longer included.
For "cache.h" and "proto.h" the local copies are included.
* additional_commands.c must is part of the fs_shell and must be build in
the same environment as the fs_shell. The fs_shell definitions must be
used for system dependencies.
* The FS add-on has a platform dependency, since it opens and fstat()s
the underlying device. open() is harmless, but we must wrap fstat().
* We don't longer compile in kernel_cpp.cpp, but rather use the
platform C++ support directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11569 a95241bf-73f2-0310-859d-f6bbb57e9c96
Linux:
* Corrected use of error code. We consequently use the errors we
defined to be compatible with BeOS and translate error code to and from
the build platform where necessary.
* Consequently use the structs my_stat and my_dirent and the type
fs_off_t when dealing with the guest FS. my_dirent had to be adjusted
to be BeOS compatible.
We wrap the platform fstat() now to translate the struct stat to the
BeOS representation.
* Fixed a bug introduced with the last checkin: The fs_shell crashed after
executing a command.
* Fixed printf() format warnings under Linux.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11565 a95241bf-73f2-0310-859d-f6bbb57e9c96
a previous and unfinished transaction. It should now work correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11553 a95241bf-73f2-0310-859d-f6bbb57e9c96
use all Haiku headers save the POSIX and STL headers. Let's see how we
fare on Linux with this change...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11552 a95241bf-73f2-0310-859d-f6bbb57e9c96
hand. Fixed all compiler errors.
* Changed the mechanism for including additional commands. Now an array
is exported by the instance code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11550 a95241bf-73f2-0310-859d-f6bbb57e9c96
fs_shell. A Linux specific one will follow as soon as the fs_shell builds
under Linux.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11543 a95241bf-73f2-0310-859d-f6bbb57e9c96
This is the first step towards getting rid of the UserlandFS dependency
for building a HD image. Which is in turn the first step to being able to
build one under Linux.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11541 a95241bf-73f2-0310-859d-f6bbb57e9c96
transaction order which caused corrupted disks when a log was replayed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11539 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed warnings.
Made gArchiveNameField static (and therefore changed the prefix to 's').
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11528 a95241bf-73f2-0310-859d-f6bbb57e9c96
info.
* Implemented arch_set_cpu_state() (Axel, please check, what registers
the debugger should actually be allowed to modify).
* Fixed arch_get_cpu_state(). We now explicitly copy the registers
manually instead of using memcpy(). Added support for extended
registers (FPU,...).
* Completed break- and watchpoint support.
* Implemented handling of debug and breakpoint exceptions.
The x86 specific part of the userland debugging support should be complete
now. That is in theory the entire debugging interface is available on x86
machines now. It's almost completely untested yet, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11526 a95241bf-73f2-0310-859d-f6bbb57e9c96
needed to get the topmost user iframe. Added i386_get_user_iframe() for
exactly that purpose.
* Added reinitialization of user debugging for the new thread when
switching the context.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11523 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Made the parameter for restoring the FPU state const.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11522 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added event callbacks for break- and watchpoints and single stepping.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11520 a95241bf-73f2-0310-859d-f6bbb57e9c96
it also checks for binary version number in case you try to load anything else (who knows ...)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11517 a95241bf-73f2-0310-859d-f6bbb57e9c96
checks only the version number (should be 3 at the moment)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11516 a95241bf-73f2-0310-859d-f6bbb57e9c96
functions for setting break-/watchpoints (implemented).
Break-/watchpoints don't work yet, though. Missing is still the setting
of the debug control register DR7 somewhere in the interrupt code and
the handling of debug exceptions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11509 a95241bf-73f2-0310-859d-f6bbb57e9c96
* In team_delete_team() we no longer explicitly destroy the team debug
info. It is not necessary, since the terminating debug nub thread will
do that anyway. Moreover we access the debugger port in a safer manner
now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11504 a95241bf-73f2-0310-859d-f6bbb57e9c96
by the team lock, but by a lock in the structure. This is necessary
since we can't acquire the team lock while thread switching, for then the
thread lock is already held.
* Added support for single stepping and break-/watchpoints.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11503 a95241bf-73f2-0310-859d-f6bbb57e9c96