search for: d_ino

Displaying 20 results from an estimated 144 matches for "d_ino".

2006 Jan 19
0
Question about d_ino used in scp.c
Hi, There's exactly one usage of the dirent.d_ino member in the whole project, which is in the readdir loop in scp.c, like this: while (readdir) { if (d_ino == 0) continue; [...] } This loop is basically taken from rcp.c as far as I can see. However, I have two problems here. - First, I have no idea why and when readdir shoul...
2012 Dec 17
3
getdents spinning on 0x7fffffff
...2^31-1. So after enough creates (and deletes :)) in a directory we end up with an entry item whose key is past that value. f_pos gets rewound instead of being set to that magical EOF. readdir() gets stuck returning the entries after INT_MAX over and over (just one in this strace): getdents(3, {{d_ino=257, d_off=2147483647, d_reclen=32, d_name="file-54"}}, 32768) = 32 getdents(3, {{d_ino=257, d_off=2147483647, d_reclen=32, d_name="file-54"}}, 32768) = 32 It took around 10 hours on a workstationy box over here to reproduce this with createmany.c from the lustre tests ("....
2023 Mar 07
0
+ ufs-dont-flush-page-immediately-for-dirsync-directories.patch added to mm-unstable branch
...lock_page(page); + unlock_page(page); +} + +static int ufs_handle_dirsync(struct inode *dir) +{ + int err; + + err = filemap_write_and_wait(dir->i_mapping); + if (!err) + err = sync_inode_metadata(dir, 1); return err; } @@ -99,11 +104,12 @@ void ufs_set_link(struct inode *dir, str de->d_ino = cpu_to_fs32(dir->i_sb, inode->i_ino); ufs_set_de_type(dir->i_sb, de, inode->i_mode); - err = ufs_commit_chunk(page, pos, len); + ufs_commit_chunk(page, pos, len); ufs_put_page(page); if (update_times) dir->i_mtime = dir->i_ctime = current_time(dir); mark_inode_dirty...
2009 Mar 06
0
[PATCH 2/3] COM32 API: restructure DIR
...mp; (regs.esi.w[0] != 0)) { - newde = calloc(1, sizeof(newde)); - if (newde != NULL) { - strcpy(newde->d_name, __com32.cs_bounce); - newde->d_mode = regs.edx.w[0]; - newde->d_type = (newde->d_mode & S_IFMT) >> 12; - newde->d_size = regs.eax.l; - newde->d_ino = regs.ebx.l; - dir->dd_stat = 1; - } else { - dir->dd_stat = -2; - errno = ENOMEM; - } + newde = dir->dd_de; + strcpy(newde->d_name, __com32.cs_bounce); + newde->d_mode = regs.edx.w[0]; + newde->d_type = (newde->d_mode & S_IFMT) >> 12; + newde-...
2023 Mar 07
3
remove most callers of write_one_page v4
Hi all, this series removes most users of the write_one_page API. These helpers internally call ->writepage which we are gradually removing from the kernel. Changes since v3: - drop all patches merged in v6.3-rc1 - re-add the jfs patch Changes since v2: - more minix error handling fixes Changes since v1: - drop the btrfs changes (queue up in the btrfs tree) - drop the finaly move to
2001 Mar 28
0
sftp client globbing problems on Solaris, Irix, etc
...>dir[od->offset++]->filename, + sizeof(ret->d_name)); +#endif #ifdef __GNU_LIBRARY__ /* * Idiot glibc uses extensions to struct dirent for readdir with * ALTDIRFUNCs. Not that this is documented anywhere but the * source... Fake an inode number to appease it. */ - ret.d_ino = inum++; + ret->d_ino = inum++; if (!inum) inum = 1; #endif /* __GNU_LIBRARY__ */ - return(&ret); + return(ret); } void fudge_closedir(struct SFTP_OPENDIR *od) -- | Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's | http://www.mindrot.org...
2006 Feb 22
7
[Bug 1161] scp -r fails
http://bugzilla.mindrot.org/show_bug.cgi?id=1161 Summary: scp -r fails Product: Portable OpenSSH Version: 4.3p1 Platform: ix86 OS/Version: Cygwin on NT/2k Status: NEW Severity: normal Priority: P2 Component: scp AssignedTo: bitbucket at mindrot.org ReportedBy: gregt at post.pl This is on
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...include/dirent.h @@ -0,0 +1,36 @@ +/* + * dirent.h + */ + +#ifndef _DIRENT_H +#define _DIRENT_H + +#include <klibc/extern.h> +#include <klibc/compiler.h> +#include <stddef.h> +#include <sys/types.h> + +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + +struct dirent { + long d_ino; /* Inode/File number */ + off_t d_size; /* Size of file */ + mode_t d_mode; /* Type of file */ + char d_name[NAME_MAX + 1]; +}; + +typedef struct { + short dd_stat; /* status return from last lookup */ + uint16_t dd_fd; + size_t dd_sect; + char dd_name[NAME_MAX + 1]; /* directory */ +} DI...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...include/dirent.h @@ -0,0 +1,36 @@ +/* + * dirent.h + */ + +#ifndef _DIRENT_H +#define _DIRENT_H + +#include <klibc/extern.h> +#include <klibc/compiler.h> +#include <stddef.h> +#include <sys/types.h> + +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + +struct dirent { + long d_ino; /* Inode/File number */ + off_t d_size; /* Size of file */ + mode_t d_mode; /* Type of file */ + char d_name[NAME_MAX + 1]; +}; + +typedef struct { + short dd_stat; /* status return from last lookup */ + uint16_t dd_fd; + size_t dd_sect; + char dd_name[NAME_MAX + 1]; /* directory */ +} DI...
2023 Jan 18
9
remove most callers of write_one_page v3
Hi all, this series removes most users of the write_one_page API. These helpers internally call ->writepage which we are gradually removing from the kernel. Changes since v2: - more minix error handling fixes Changes since v1: - drop the btrfs changes (queue up in the btrfs tree) - drop the finaly move to jfs (can't be done without the btrfs patches) - fix the existing minix code to
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
....stat", filestr2); + errno = 0; + } + de_size = (int)fdstat.st_size; + *st_mode = fdstat.st_mode; +#endif /* __COM32__ */ + return de_size; +} /* rosh_ls_de_size_mode */ + +/* Returns the Inode number if fdstat contains it + * fdstat struct to extract size from if not COM32 + */ +long rosh_ls_d_ino(struct stat *fdstat) +{ + long de_ino; +#ifdef __COM32__ + de_ino = -1; +#else /* __COM32__ */ + de_ino = fdstat->st_ino; +#endif /* __COM32__ */ + return de_ino; +} + +/* Convert a d_type to a single char by ls's prefix standards + * d_type d_type to convert + * returns ls style single char...
2001 May 31
1
Possible bug in openssh configuration file
...: assignment type mismatch: pointer to function(pointer to const char) returning pointer to void "=" pointer to void "sftp-glob.c", line 157: warning: assignment type mismatch: pointer to function(pointer to void) returning pointer to struct dirent {unsigned long d_ino, long d_off, unsigned short d_reclen, array[1] of char d_name} "=" pointer to void "sftp-glob.c", line 158: warning: assignment type mismatch: pointer to function(pointer to void) returning void "=" pointer to void "sftp-glob.c", line 167: warning: ar...
2009 Jan 15
2
Fatal: Plugin sieve_plugin not found from directory
...l: Multiple files for module sieve_plugin: /usr/lib64/dovecot/lda/lib90_sieve_plugin.so, /usr/lib64/dovecot/lda/sieve_plugin.so Invoking the deliver process with strace showed /usr/lib64/dovecot/lda being opened, fstated, and getdents returned the expected results, including {d_ino=67593, d_off=608760247, d_reclen=40, d_name="lib90_sieve_plugin.so"} After this, the plugin (nor any other file, aside from /etc/localtime) was not opened, the above error was sent, and deliver exited. The RPM was recompiled for CentOS 5.1 from an ArkLinux Dovecot 1.2 SRPM; the s...
2000 Sep 12
0
OpenSSH 2.2.0p1 port to QNX 4
...- openssh-2.2.0p1.qnx/scp.c Tue Sep 12 10:29:21 2000 *************** *** 650,656 **** --- 650,660 ---- return; } while ((dp = readdir(dirp))) { + #if defined(__QNX__) && !defined(__QNXNTO__) + if (dp->d_stat.st_ino == 0) + #else /* !__QNX__ || __QNXNTO__ */ if (dp->d_ino == 0) + #endif /* !__QNX__ || __QNXNTO__ */ continue; if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; *************** *** 1050,1055 **** --- 1054,1064 ---- bad: fprintf(stderr, "%s: invalid user name\n", cp0); return (0);...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...", de->d_name); + errno = 0; + } + de_size = (int)fdstat.st_size; + *st_mode = fdstat.st_mode; + return de_size; +} /* rosh_ls_de_size_mode */ + +/* Returns the Inode number if fdstat contains it + * fdstat struct to extract inode from if not COM32, for now + */ +long rosh_ls_d_ino(struct stat *fdstat) +{ + long de_ino; +#ifdef __COM32__ + if (fdstat) + de_ino = -1; + else + de_ino = 0; +#else /* __COM32__ */ + de_ino = fdstat->st_ino; +#endif /* __COM32__ */ + return de_ino; +} + +/* Convert a d_type to a single char in human readable format + * d_type d_ty...
2001 Mar 22
9
Portable OpenSSH-2.5.2p2
Portable OpenSSH 2.5.2p2 is now available from the mirror sites listed at http://www.openssh.com/portable.html Security related changes: Improved countermeasure against "Passive Analysis of SSH (Secure Shell) Traffic" http://openwall.com/advisories/OW-003-ssh-traffic-analysis.txt The countermeasures introduced in earlier OpenSSH-2.5.x versions caused interoperability problems with
2001 Mar 22
9
Portable OpenSSH-2.5.2p2
Portable OpenSSH 2.5.2p2 is now available from the mirror sites listed at http://www.openssh.com/portable.html Security related changes: Improved countermeasure against "Passive Analysis of SSH (Secure Shell) Traffic" http://openwall.com/advisories/OW-003-ssh-traffic-analysis.txt The countermeasures introduced in earlier OpenSSH-2.5.x versions caused interoperability problems with
2009 Feb 15
2
COM32 module: Read-Only shell
...estr2[0] = 0; + file2pos = strlen(filestr); + memcpy(filestr2, filestr, file2pos); + filestr2[file2pos] = '/'; + strcpy(filestr2+file2pos+1, de->d_name); + fd2 = open(filestr2, O_RDONLY); + status = fstat(fd2, &fdstat); + printf("@%8d:%8d:", (int)de->d_ino, (int)fdstat.st_size); + fd2 = close(fd2); +#endif /* DO_DEBUG */ + printf("%s\n", de->d_name); +#ifdef DO_DEBUG +// inchar = fgetc(stdin); +#endif /* DO_DEBUG */ + de = readdir(d); + } + closedir(d); + } else if (S_ISREG(fdstat.st_mode)) { + ROSH_DEBUG("PATH '...
2014 May 29
3
[PATCH 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Wrote the documentation below. I think it would be good to push the doc to the wiki as soon as the UFS support gets merged. Unix Fast File System (UFS/FFS) 1/2 on Syslinux - (usage/install) ----- There is a confusion about the name of this file system, then I decided to contact the author who replied: "The name has always been
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...es + * (must be a multiple of 4) + */ +#define UFS_DIR_PAD 4 +#define UFS_DIR_ROUND (UFS_DIR_PAD - 1) +#define UFS_DIR_REC_LEN(name_len) (((name_len) + 1 + 8 + UFS_DIR_ROUND) & ~UFS_DIR_ROUND) + +struct ufs_timeval { + __fs32 tv_sec; + __fs32 tv_usec; +}; + +struct ufs_dir_entry { + __fs32 d_ino; /* inode number of this entry */ + __fs16 d_reclen; /* length of this entry */ + union { + __fs16 d_namlen; /* actual length of d_name */ + struct { + __u8 d_type; /* file type */ + __u8 d_namlen; /* length of string in d_name */ + } d_44; + } d_u; + __u8 d_name[UFS_MAXNAMLEN + 1]; /*...