This discussion is archived
2 Replies Latest reply: Nov 16, 2009 1:16 PM by 807567 RSS

write a string to a v_path pointer

807567 Newbie
Currently Being Moderated
Hi,

Could anybody show me how to write a string to a v_path pointer of a vnode?
Below is what I want to do:

> 00000300245f53c0::print vnode_t v_path
v_path = 0x300128e5aa0 "/opt/bns/k2/V6.0/script"
> 0x300128e5aa0/W "new_path_name"
mdb: failed to dereference symbol: unknown symbol name
mdb: failed to write "new_path_name": failed to evaluate command

But it gave me error message.

Please help.

Thanks

Alex
  • 1. Re: write a string to a v_path pointer
    807567 Newbie
    Currently Being Moderated
    There is no write string in mdb so need to do it char by char using ascii codes.
    0x300123e8a80::print vnode_t v_path
    v_path = 0x30007e56d68 "/usr/bin/vi"
    0x30007e56d68,0t11/B
    0x30007e56d68: 2f 75 73 72 2f 62 69 6e 2f 76 69
    0x30007e56d68/v 2f 65 74 63
    0x30007e56d68: 0x2f = 0x2f
    0x30007e56d69: 0x75 = 0x65
    0x30007e56d6a: 0x73 = 0x74
    0x30007e56d6b: 0x72 = 0x63
    0x300123e8a80::print vnode_t v_path
    v_path = 0x30007e56d68 "/etc/bin/vi"
    No idea why you would want too.

    Edited by: .robv. on 10-Nov-2009 13:41
  • 2. Re: write a string to a v_path pointer
    807567 Newbie
    Currently Being Moderated
    Thank you very much.
    Don't worry I'm not going to do something bad :)

    Alex