From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Dyson Subject: i_op->listxattr semantics Date: Sat, 07 Jun 2003 21:34:34 -0400 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1055036074.27963.367.camel@thalience> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7BIT Return-path: Received: from smtp-out.comcast.net ([24.153.64.116]:61077 "EHLO smtp-out.comcast.net") by vger.kernel.org with ESMTP id S264219AbTFHBU7 (ORCPT ); Sat, 7 Jun 2003 21:20:59 -0400 Received: from thalience.dyndns.org (pcp04129087pcs.walngs01.pa.comcast.net [68.80.162.238]) by mtaout04.icomcast.net (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HG5006WM31N5K@mtaout04.icomcast.net> for linux-fsdevel@vger.kernel.org; Sat, 07 Jun 2003 21:34:36 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by thalience.dyndns.org (Postfix) with ESMTP id 7437E11B05C for ; Sat, 07 Jun 2003 21:34:35 -0400 (EDT) To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hello all, I am attempting to implement support for extended attributes in the Be Filesystem (befs) driver. But I am stuck trying to figure out why the getfattr program does not list my attributes. Below is a test version of befs_listxattr that gives all files one attribute named "MyAttr". When I mount my filesystem on /befs (in 2.5.69-uml) and issue the command "getfattr -d /befs", no attributes are printed. The debugging statements appear in my syslog, so I know the function is being called. Can anyone help me figure out what I am doing wrong? Thanks! static ssize_t befs_listxattr(struct dentry *dentry, char *buffer, size_t size) { struct super_block *sb = dentry->d_inode->i_sb; ssize_t attr_len = 0; char *attr = "MyAttr"; befs_debug(sb, "---> befs_listxattr for inode %lu " "with %d buffer_size", dentry->d_inode->i_ino, size); attr_len = strlen(attr); if (buffer) { memcpy(buffer, attr, attr_len); buffer[attr_len] = '\0'; } befs_debug(sb, "<--- befs_listxattr"); return attr_len + 1; } -- Will Dyson "Back off man, I'm a scientist!" -Dr. Peter Venkman