History log of /haiku/src/tools/fs_shell/command_cp.cpp
Revision Date Author Comments
# 6ac10b2f 21-Mar-2024 Augustin Cavalier <waddlesplash@gmail.com>

fs_shell: Fix double-assignment of targetDeleter.

Otherwise we will encounter the new assertion in AutoDeleter.
Fixes the nightly build following recent commits.


# 2459b6db 30-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

CID 701865: missing break in switch.


# 6b5090f2 08-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

When copying attributes only, it suffices to open the target read-only. Fixes
the image build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30677 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 843ce67e 07-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't let GuestNode::Init() fail if the attribute directory could not be
opened; not all file systems support this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30654 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bc3955fe 23-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Preparations for removing __BEOS__ from the compiler defines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2988eab3 30-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for option '-L' (always dereference symbolic links).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25279 a95241bf-73f2-0310-859d-f6bbb57e9c96


# baba54f9 25-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added options -x and -X to the "cp" command, used to specify exclude
patterns for file respectively path names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0006905b 09-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added "--ignore-attributes" switch to the "cp" command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24330 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9b0e6ad 11-Feb-2008 Michael Lotz <mmlr@mlotz.ch>

Two very small changes that help compiling Haiku under Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23947 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2453fa 12-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

Added a progress monitor when copying large files (ie. over 1 MB).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23457 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fd51b44e 04-Sep-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* HostSymLink::fPath wasn't set to NULL by the constructor, which could
cause a segfault if Init() failed early.
* The -d (don't dereference symlinks) option of cp shall only take
effect on the top level. When descending into directories, symlinks
shall never be dereferenced.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22179 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9b5ab44d 26-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added switch "-a" to the FS shell's cp command. It turns on "attribute
only" mode, in which only the attributes from the source files are
copied to the (existing) target file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21710 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ddfffd4 06-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed left over debug output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21039 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19d7a2a1 02-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the syscalls into the FSShell namespace, so that they don't
collide with the functions defined in libroot_build.so.
* On BeOS incompatible platforms fssh_open() and fssh_close() use the
libroot_build.so _kern_open() and _kern_close() respectively, so that the
attribute support works also when using the generic attribute
emulation.
* Use fssh_open()/fssh_close() instead of open()/close() for the cp
command, so that we get attribute support on BeOS incompatible
platforms when the generic attribute emulation is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20980 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3c6ad0a 30-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

BeOS build fixes:
* On BeOS compatible host platforms we must not include
BeOSBuildCompatibility.h, but HaikuBuildCompatibility.h.
* Fixed errno usage in command_cp.cpp.
* Fixed fssh_ioctl().
* fssh_set_sem_owner() doesn't invoke BeOS's set_sem_owner() anymore or
otherwise the FS's semaphores are assigned to the kernel.
* Commented out <string.h> functions that don't exist under BeOS (and aren't
used anyway).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20934 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1137bb03 28-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added cp command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b5090f2f600971de934b89524eeca79b9e8f0e7 08-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

When copying attributes only, it suffices to open the target read-only. Fixes
the image build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30677 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 843ce67e3d4ef39240a60b63e91c3c2b7fd1df28 07-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't let GuestNode::Init() fail if the attribute directory could not be
opened; not all file systems support this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30654 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bc3955fea5b07e2e94a27fc05e4bb58fe6f0319b 23-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Preparations for removing __BEOS__ from the compiler defines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2988eab3dc35d863e4838b29a3ec0d8dc3586bb9 30-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for option '-L' (always dereference symbolic links).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25279 a95241bf-73f2-0310-859d-f6bbb57e9c96


# baba54f94fbcb9bb2d9762a0b71ec684b20c4614 25-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added options -x and -X to the "cp" command, used to specify exclude
patterns for file respectively path names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0006905bfb26b36b918a75fb1b44cdac13ea698a 09-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added "--ignore-attributes" switch to the "cp" command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24330 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9b0e6addda467c9a74891eaae7c5022840b4003 11-Feb-2008 Michael Lotz <mmlr@mlotz.ch>

Two very small changes that help compiling Haiku under Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23947 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2453fa9c27d586220a4662f3aba4b6f692b219 12-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

Added a progress monitor when copying large files (ie. over 1 MB).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23457 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fd51b44e2db4c242cf6772d6497547a3e8b1e4ae 04-Sep-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* HostSymLink::fPath wasn't set to NULL by the constructor, which could
cause a segfault if Init() failed early.
* The -d (don't dereference symlinks) option of cp shall only take
effect on the top level. When descending into directories, symlinks
shall never be dereferenced.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22179 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9b5ab44de940a59302c286917f97c9d3682b4b64 26-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added switch "-a" to the FS shell's cp command. It turns on "attribute
only" mode, in which only the attributes from the source files are
copied to the (existing) target file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21710 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ddfffd44a25fe1bf5bb87094731426d42cba16c 06-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed left over debug output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21039 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19d7a2a162c1adc9775fdbc3c89c22327386354e 02-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the syscalls into the FSShell namespace, so that they don't
collide with the functions defined in libroot_build.so.
* On BeOS incompatible platforms fssh_open() and fssh_close() use the
libroot_build.so _kern_open() and _kern_close() respectively, so that the
attribute support works also when using the generic attribute
emulation.
* Use fssh_open()/fssh_close() instead of open()/close() for the cp
command, so that we get attribute support on BeOS incompatible
platforms when the generic attribute emulation is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20980 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3c6ad0a0be88d057b4f87a81277bf3ec232df39 30-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

BeOS build fixes:
* On BeOS compatible host platforms we must not include
BeOSBuildCompatibility.h, but HaikuBuildCompatibility.h.
* Fixed errno usage in command_cp.cpp.
* Fixed fssh_ioctl().
* fssh_set_sem_owner() doesn't invoke BeOS's set_sem_owner() anymore or
otherwise the FS's semaphores are assigned to the kernel.
* Commented out <string.h> functions that don't exist under BeOS (and aren't
used anyway).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20934 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1137bb03cc97d0c36338ff8d6c5f2bc21169a48f 28-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added cp command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20885 a95241bf-73f2-0310-859d-f6bbb57e9c96