Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

xen-pvfb-terminate.patch
Friday, May 18th, 2007 at 12:51:42pm UTC 

  1. --- a/tools/xenfb/xenfb.c       2007-02-27 18:39:54.000000000 +0100
  2. +++ b/tools/xenfb/xenfb.c       2007-03-02 15:06:07.000000000 +0100
  3. @@ -243,6 +243,8 @@ static int xenfb_wait_for_state(struct x
  4.         unsigned state, dummy;
  5.         char **vec;
  6.  
  7. +       awaited |= 1 << XenbusStateUnknown;
  8. +
  9.         for (;;) {
  10.                state = xenfb_read_state(xsh, dir);
  11.                if (state < 0)
  12. @@ -317,6 +319,10 @@ static int xenfb_using_old_protocol(stru
  13.  
  14.         for (;;) {
  15.                state = xenfb_read_state(xsh, xenfb->fb.otherend);
  16. +              if (state == XenbusStateUnknown) {
  17. +                     ret = -1;
  18. +                     break;
  19. +              }
  20.                if (state > XenbusStateInitialising) {
  21.                       ret = 0; /* frontend talks xenbus protocol */
  22.                       break;
  23. @@ -534,7 +540,7 @@ int xenfb_attach_dom(struct xenfb *xenfb
  24.  {
  25.         struct xenfb_private *xenfb = (struct xenfb_private *)xenfb_pub;
  26.         struct xs_handle *xsh = xenfb->xsh;
  27. -       int val, serrno;
  28. +       int ret, val, serrno;
  29.         struct xenfb_page *fb_page;
  30.  
  31.         xenfb_detach_dom(xenfb);
  32. @@ -564,8 +570,9 @@ int xenfb_attach_dom(struct xenfb *xenfb
  33.         if (!xs_watch(xsh, xenfb->kbd.otherend, ""))
  34.                goto error;
  35.  
  36. -       if (xenfb_using_old_protocol(xenfb))
  37. -              return 1;
  38. +       ret = xenfb_using_old_protocol(xenfb);
  39. +       if (ret)
  40. +              return ret;
  41.  
  42.         if (xenfb_wait_for_frontend_initialised(&xenfb->fb) < 0)
  43.                goto error;

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right