* syscalls.cc (_link): Revert previous change and just always dereference the
oldpath.
This commit is contained in:
parent
e51cfd3116
commit
8a19897f17
|
@ -1,3 +1,8 @@
|
||||||
|
2002-08-01 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* syscalls.cc (_link): Revert previous change and just always
|
||||||
|
dereference the oldpath.
|
||||||
|
|
||||||
2002-08-01 Christopher Faylor <cgf@redhat.com>
|
2002-08-01 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* syscalls.cc (link): Properly deal with a link to a symlink.
|
* syscalls.cc (link): Properly deal with a link to a symlink.
|
||||||
|
|
|
@ -305,11 +305,10 @@ _read (int fd, void *ptr, size_t len)
|
||||||
DWORD wait = cfd->is_nonblocking () ? 0 : INFINITE;
|
DWORD wait = cfd->is_nonblocking () ? 0 : INFINITE;
|
||||||
|
|
||||||
/* Could block, so let user know we at least got here. */
|
/* Could block, so let user know we at least got here. */
|
||||||
syscall_printf ("read (%d, %p, %d) %sblocking, sigcatchers %d",
|
syscall_printf ("read (%d, %p, %d) %sblocking, sigcatchers %d", fd, ptr, len, wait ? "" : "non", sigcatchers);
|
||||||
fd, ptr, len, wait ? "" : "non", sigcatchers);
|
|
||||||
|
|
||||||
if (wait && (!cfd->is_slow () || cfd->get_r_no_interrupt ()))
|
if (wait && (!cfd->is_slow () || cfd->get_r_no_interrupt ()))
|
||||||
debug_printf ("no need to call ready_for_read\n");
|
debug_printf ("non-interruptible read\n");
|
||||||
else if (!cfd->ready_for_read (fd, wait))
|
else if (!cfd->ready_for_read (fd, wait))
|
||||||
{
|
{
|
||||||
res = -1;
|
res = -1;
|
||||||
|
@ -615,9 +614,8 @@ _link (const char *a, const char *b)
|
||||||
{
|
{
|
||||||
int res = -1;
|
int res = -1;
|
||||||
sigframe thisframe (mainthread);
|
sigframe thisframe (mainthread);
|
||||||
|
path_conv real_a (a, PC_SYM_FOLLOW | PC_FULL);
|
||||||
path_conv real_b (b, PC_SYM_NOFOLLOW | PC_FULL);
|
path_conv real_b (b, PC_SYM_NOFOLLOW | PC_FULL);
|
||||||
path_conv real_a (a, PC_SYM_NOFOLLOW | PC_FULL);
|
|
||||||
extern BOOL allow_winsymlinks;
|
|
||||||
|
|
||||||
if (real_a.error)
|
if (real_a.error)
|
||||||
{
|
{
|
||||||
|
@ -648,8 +646,6 @@ _link (const char *a, const char *b)
|
||||||
/* Try to make hard link first on Windows NT */
|
/* Try to make hard link first on Windows NT */
|
||||||
if (wincap.has_hard_links ())
|
if (wincap.has_hard_links ())
|
||||||
{
|
{
|
||||||
if (allow_winsymlinks && real_b.issymlink ())
|
|
||||||
strcat (real_a, ".lnk");
|
|
||||||
if (CreateHardLinkA (real_b, real_a, NULL))
|
if (CreateHardLinkA (real_b, real_a, NULL))
|
||||||
{
|
{
|
||||||
res = 0;
|
res = 0;
|
||||||
|
|
Loading…
Reference in New Issue